quit
Terminate MATLAB program
Description
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.
Example: quit(0,"force")
Input Arguments
Alternatives
Click the close button on the MATLAB desktop.
Version History
Introduced before R2006a