A very simple, and perhaps obvious, question: How can I abort execution of a Matlab M-script using a statement within the script?
This is analogous to calling ret
ret
As of Matlab R2015b break can no longer be used to pre-terminate a script. A break can now only be used to a for-loop. The code will not run and an error will be thrown. This was technically always true, but it is now enforced.
break
The proper way is to use return
return