stop for loop if a thing happens
9 ビュー (過去 30 日間)
古いコメントを表示
for example:
for i=1:10
a=i+1
if a>5
exit from loop % *which command do this*
end
end
0 件のコメント
採用された回答
Jan
2011 年 9 月 8 日
Or BREAK.
You can find a list of commands concerning FOR loops in the "See also" line of help for. This line is created exactly for such questions.
0 件のコメント
その他の回答 (2 件)
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!