error in using strcmp

조회 수: 13 (최근 30일)
Shanam Afzal
Shanam Afzal 2017년 6월 15일
댓글: Shanam Afzal 2017년 6월 15일
m getting this error in using strcmp/strcmpi:
need segmentation? YES/NO:yes Undefined function or variable 'strcpmi'.
Error in demo (line 15) if strcpmi(str, 'yes')
my code is as following:
str=input('need segmentation? YES/NO:', 's');
%str= input(prompt, 's');
if strcpmi(str, 'yes')
st=input('image contains different color object? Y/N:','s');
% st=input(prompt,'s');
%kmeans1();
% else
% trydelta();
end
What m i doing wrong here?? Also my code also doesnt display any messages when i use prompt or sprintf even there is no error

채택된 답변

Adam
Adam 2017년 6월 15일
You spelled the function name wrong (though managed to spell it correctly in your question tag!)
strcmpi
is what you need, not
strcpmi
  댓글 수: 1
Shanam Afzal
Shanam Afzal 2017년 6월 15일
thank you for noticing! @Adam

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by