MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayNew to MATLAB?
MATLAB Central > MATLAB Newsreader > while loop inside a for loop 

Subject: while loop inside a for loop From: Emma Robertson Date: 1 Mar, 2012 12:32:14 Message: 1 of 6 
Hi, can someone please tell me why "time" (t) is not updated correctly within the while loop? Please run this small code in your machine and you'll know what I'm taking about. 
"Emma Robertson" wrote in message <jinq8e$j1f$1@newscl01ah.mathworks.com>... 
Subject: while loop inside a for loop From: Emma Robertson Date: 1 Mar, 2012 16:37:17 Message: 3 of 6 
"someone" wrote in message <jio4ps$ohn$1@newscl01ah.mathworks.com>... 
Subject: while loop inside a for loop From: Roger Stafford Date: 1 Mar, 2012 17:55:16 Message: 4 of 6 
"Emma Robertson" wrote in message <jio8jt$99l$1@newscl01ah.mathworks.com>... 
"Roger Stafford" wrote in message <jiod64$os0$1@newscl01ah.mathworks.com>... 
Subject: while loop inside a for loop From: Emma Robertson Date: 1 Mar, 2012 21:15:21 Message: 6 of 6 
"someone" wrote in message <jiomeg$s7m$1@newscl01ah.mathworks.com>... 
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.