Instead of writing quit in my .m file, can I do this through command? I want to close MATLAB right after the file execution is completed.
For example, this is my command
matlab -nodisplay < my_script
Thank you very much.
This is the actual command I was trying to make
matlab -nodisplay -nodesktop -nosplash -nojvm -r "try, basic_plot;end, quit"
Edit:
Following Edric’s recommendation, you’d better use one of these: