Why does strcmp return 0 in in the matlab script while 1 on consol
Afficher commentaires plus anciens
Hi,
I wonder what mistake I am doing!
When I run the following code on console I get correct output (flag=1) while the same code evaluates to (flag=0) when run in matlab script file. I am trying with Hindi unicode characters. During debug watch I get same values as expected in the variable but evaluation is not as expected. I tried with isequal() function also. but it results same behavior.
-------------
previous='ग';
character='ा';
if strcmp(previous,'ग') && strcmp(character,'ा')
flag=1
else
flag=0
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
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!