Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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 ]
rajkrai@gmail.com

Posts: 8
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

Hi:
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.

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

Regards,
r



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.