second expression and second statement doesn't excuted in else if ?
이전 댓글 표시
why the second condition and second statments don't take into account (doeasn't excuted ) ? when I excuted the code only the first condition and its statment excuted as well as to the last statement
if condition 1
do some calculation 1
elseif condition 2
do some calculation 2
else
do some calculation 3
end
댓글 수: 3
Torsten
2022년 8월 24일
The most probable answer is: condition 2 was never true.
To tell you something more useful, we have to see your code.
omar th
2022년 8월 24일
It could be that the second conditon was never true when the first condition was false.
if true % 1st condition always true
elseif true % 2nd condition also always true but never checked
else
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!