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.
quit
.m
F
write down in the last line of your .m file and when you run your simulation after it shows result it will quit itself.
[...] % code quit