Terminate MATLAB program
quit
terminates the MATLAB® program. The quit
function
does not automatically save the workspace.
To interrupt a MATLAB command, see Stop Execution.
quit cancel
is for use in a finish.m
script and cancels quitting. It has no effect anywhere else.
quit force
bypasses finish.m
and
terminates MATLAB. Use this syntax to override the finish
script if
the script does not let you quit.
quit(
returns the specified value
as the MATLAB exit code.code
)
quit(
bypasses
code
,"force")finish.m
and terminates MATLAB with the exit code.
quit(0,"force")
MATLAB
Online™ does not support displaying a confirmation dialog box
or using a finish.m
script. Before logging out, MATLAB
Online saves open files and session data.
Click the close button on the MATLAB desktop.