Why does strcmp return 0 in in the matlab script while 1 on consol
이전 댓글 표시
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
-------------------------
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!