How can ı use second break command?
1 次查看(过去 30 天)
显示 更早的评论
when ı try second break command in different while loops in the same script, second break command doesnt work. How can I fix this?
2 个评论
回答(1 个)
Matthias Walle
2016-10-6
while 1
while 2
1
break
end
2
break
end
while 3
3
break
end
Usually you can use as many break commands as you wish in the same skript. Your second break command will probably never be reached by the program if 'it doesn't work'. As mentioned you should provide some code to describe your problem
0 个评论
另请参阅
类别
在 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!