How can I leave the loop completely, if an "if" statement in that loop turns out to be true? I have tried break, but I guess that doesn't work in if-structures… My code structure looks like this:
for i = 1:5 (doing some stuff here) if [something happens] for [...], for [...], (assignments); end, end, !and STOP COMPLETELY no further calculations are needed! else for [...], (assignments ); end end (doing more stuff)end
Thanks for any help!
Best Answer