how can i compare two things simultaneous

1 次查看(过去 30 天)
actually i want do this compare :
if ((ps{psize,pcol}==-1) | STRCOMP(ps{psize,pcol},sds{i,pcol})==1)
and matlab give me this error :
Undefined function 'STRCOMP' for input arguments of type 'char'.

回答(1 个)

Image Analyst
Image Analyst 2013-12-30
编辑:Image Analyst 2013-12-30
There is no STRCOMP(). MATLAB is case sensitive. Use strcmp(), strcmpi(), or strfind(), or similar. Note there is no "o" in the function names. Also, you should probably use || rather than | in your "or" test.

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by