Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
If else statement problem
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi, im having issues with if else statement which the value of 0 show failed.jpg. But it supposed to be show passed.jpg.
if (idx <= 4)
imshow('Passed.jpg')
else
imshow('Failed.jpg')
end
댓글 수: 0
답변 (1개)
Guillaume
2019년 12월 13일
I would suspect that the reason you always get 'failed' is because your idx is not scalar, in which case you need to loop of each element of your idx array before testing them with your if.
If that's not the issue then give attach your m code and a mat file with the necessary input to run it.
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!