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 个投票
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!