title: How do I quit MATLAB after execution is finished through command?
body: <p>Instead of writing <code>quit</code> in my <code>.m</code> file, can I do this through command? I want to close MATLAB right after the file execution is completed.</p>
  
  <p>For example, this is my command</p>
  
  <pre><code>matlab -nodisplay &lt; my_script
  </code></pre>
  
  <p>Thank you very much.</p>
  
  <hr>
  
  <p>This is the actual command I was trying to make</p>
  
  <pre><code>matlab -nodisplay -nodesktop -nosplash -nojvm -r "try, basic_plot;end, quit"
  </code></pre>