stop for loop if a thing happens
古いコメントを表示
for example:
for i=1:10
a=i+1
if a>5
exit from loop % *which command do this*
end
end
採用された回答
その他の回答 (2 件)
Wesley Ooms
2011 年 9 月 8 日
0 投票
the command is 'return' i guess
Wesley Ooms
2011 年 9 月 8 日
0 投票
i looked it up for you. the command is 'break' :)
2 件のコメント
Oleg Komarov
2011 年 9 月 8 日
@Weasley: please edit your answers in place of creating new ones.
feras almasri
2015 年 4 月 4 日
plz answer him instead of saying this
カテゴリ
ヘルプ センター および 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!