The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: break for and while loop
Replies: 1   Last Post: Jul 11, 2012 1:31 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 13
Registered: 1/18/08
break for and while loop
Posted: Jul 11, 2012 12:43 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

How I can break and come out from two for and one while loop in the following condition. It only break one for loop. Thanks for your help.

a = 1;
while (a<n);
for j = 1:4;
for i = 1:3
a = a +1;
if (a>n);break; end;


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.