How can ı use second break command?

when ı try second break command in different while loops in the same script, second break command doesnt work. How can I fix this?

2 Comments

Could you please provide an example?
Please give a minimal example of your code that does not work as intended.

Sign in to comment.

Answers (1)

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

Categories

Find more on Programming in Help Center and File Exchange

Tags

Asked:

on 6 Oct 2016

Answered:

on 6 Oct 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!