Hi, I am writing code to break out of loop. I have several loops, including nested loops. If I use break in a if command, it will jump out of all loops, or the very nearest loop(say only one loop)?
for i=1:10 for j=1:10 f(x)=... if f(x)>10 ... elseif f(x)<5 break; .... end end end
If f(x)<5 for some i=2 and j=3; then break will jump out of loop, go to i=3, j=1 or i=2 j=4?
No products are associated with this question.