Prev: integrate angular rate over time to find the the angle as a function of time
Next: count no of values and their coordinates
From: CyberFrog on 15 Mar 2010 13:39 Walter Roberson <roberson(a)hushmail.com> wrote in message <hnll2t$pee$1(a)canopus.cc.umanitoba.ca>... > CyberFrog wrote: > > > I have used this but it still doesn't make a difference to my loop, its > > still doesn't seem to jump from the current indice or line number it > > last read to the next desired line number i..e 25. > > Your for loop had f as an index, and you update f in the loop, and you > are expecting the for loop to change its range in response. That will > not happen. When you start a for loop. matlab calculates the beginning > and the end value right then, and stores them internally, and never > changes them in response to anything that happens in the loop. > > What you should do in your case is something like: > > for f = 1 : 3 > for i = list(f):whatever... > if (you should go to the next f) > break > end > process for this i > end > end Thanks alot Walter this works perfectly! CyberFrog |