strcmpi not returning 1
Afficher commentaires plus anciens
% So I'm trying to find overlap between two strings. I am trying to use a logical index but compare never returns 1, any suggestions?
function [ combined, overlap ] = AssembleSeqs(left, right)
combined=[];
overlap=[];
shorter= min(length(left), length(right))
tester=[1:shorter];
for i=1:1:shorter
tester(i)=0;
leftend=left(end-i+1)
rightend=right(i)
compare=strcmpi('leftend','rightend')
if (compare==1)
tester(i)=1;
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!