Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

exit

Terminate MATLAB program (same as quit)

Alternatives

As an alternative to the exit function, click the Close box in the MATLAB® desktop.

Syntax

exit
exit(code)

Description

exit terminates the current session of MATLAB after running finish.m, if the file finish.m exists. It performs the same as quit and takes the same termination options, such as force. Call exit from the MATLAB command prompt. To interrupt a MATLAB command, see Stop Execution.

exit(code) returns exit code when calling a MATLAB command from the system command line.

More About

See Also

|

Introduced before R2006a

Was this topic helpful?