title: How can I abort program execution in MATLAB?
body: <p>How can I stop program execution in MATLAB without exiting MATLAB. I'm looking for something like exit(1) in C++.</p>
  
  <p>I've tried exit/quit, but they also kill MATLAB which isn't the behaviour I want. </p>
  
  <p>Ideally I would have used try-catch to bubble up errors, but I'm fixing up existing code and cannot do that due to a deeply nested call stack. Thanks!</p>
  
  <p>EDIT:</p>
  
  <p>I've also tried <code>error</code> and <code>return</code>, but they end up in the invoking functions catch block which isn't what I want either. I simply want to stop the launched program to exit.</p>
  
  <p>Also, Ctrl-C requires the user to stop execution and that's not what I want either.</p>