title: Save output error messages to file in MATLAB
body: <p>Is there a way to save MATLAB error messages to a file? </p>
  
  <p>This may be a simple issue, but Google couldn't give me an answer. I've compiled a GUI executable for use without a MATLAB license, and occasionally it freezes. For aesthetic purposes, I suppressed the command window normally accompanying such an executable, so I can't get an error message out through the command prompt. I'd like to be able to create an error log which can be emailed to me for debugging.</p>
  
  <p>Thanks!</p>