| MATLAB Environment | Search  Help Desk |
Quitting MATLAB
To quit MATLAB at any time, typequit at the MATLAB prompt.
On Windows platforms, you can also quit by selecting Exit from the File menu, or by using the close box.
quit.
quit runs the script finish.m, if finish.m exists anywhere on the MATLAB path.
finish.m.
finish.m is a file you create that contains commands you want to run when MATLAB terminates. Two sample finish.m files are in /toolbox/local:
finishsav.m - saves the workspace to a MAT-file when MATLAB quits
finishdlg.m - displays a dialog allowing you to cancel quitting