I am getting error with this code. Can someone help me with this ?
for i=1:100
if (S(i).Status=='Active' || S(i).type=='N')
disp(i)
else
continue;
end
end

 채택된 답변

Bruno Luong
Bruno Luong 2020년 7월 20일

0 개 추천

Change to
...
if strcmp(S(i).Status,'Active') || strcmp(S(i).type,'N')
...
end

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

질문:

2020년 7월 20일

댓글:

2020년 7월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by