MATLAB: Cannot enable breakpoint(s) because of syntax error. a break may only be used within a for or while loop

breakbreakpointerrorloopMATLABsyntax

Trying to place a breakpoint to debug my function leads to an error:
cannot enable breakpoint(s) because of syntax error.
a break may only be used within a for or while loop, and then only within the same file as its corresponding for or while statement.

Best Answer

This is due to a change in MATLAB software. 
The "break" function can no longer be used outside for or while loops or inside for or while loops in a different file.
Changing the function "break" to the function "return" resolves this issue.