break Terminate execution of WHILE or FOR loop.
break terminates the execution of FOR and WHILE loops.
In nested loops, break exits from the innermost loop only.

If you use break outside of a FOR or WHILE loop in a MATLAB
script or function, it terminates the script or function at
that point. If break is executed in an IF, SWITCH-CASE, or
TRY-CATCH statement, it terminates the statement at that point.