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!