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.

Startup and Shutdown

Startup command line flags, startup and shutdown files


matlab (Windows)Start MATLAB program from Windows system prompt
matlab (Mac)Start MATLAB program from macOS Terminal
matlab (Linux)Start MATLAB program from Linux system prompt
exitTerminate MATLAB program (same as quit)Desktop Tools and Development Environment.Startup and Shutdown
quitTerminate MATLAB program
matlabrcStart up file for MATLAB program
startupStart up file for user-defined options
finishTermination file for MATLAB program


Start MATLAB on Windows Platforms

Different ways to start MATLAB® on a Microsoft® Windows® platform.

Start MATLAB on Mac Platforms

Start MATLAB from the Applications folder or a Terminal window.

Start MATLAB on Linux Platforms

Start MATLAB on Linux® platforms by typing matlab at the operating system prompt.

Specify Startup Options

Specify startup options (also called command flags or command-line switches) that instruct the MATLAB program to perform certain operations when you start it.

MATLAB Startup Folder

Set the initial working folder using the General Preferences panel.


Ways to exit MATLAB.


Recovering Data After an Abnormal Termination

If MATLAB terminates unexpectedly, then you might lose information. After you start MATLAB again, there are several methods for recovering some of the information.

Error Log Reporting

Upon startup, if MATLAB detects an error log generated by a serious problem during the previous session, then an Error Log Reporter prompts you to email the log to MathWorks® for analysis.

When MATLAB Terminates Unexpectedly

In the event MATLAB experiences a segmentation violation (segv) or other serious problem, the MATLAB System Error dialog box opens to notify you about the problem.

Specifying Java Startup Options

You can specify custom Java® startup options by creating a java.opts file.

Associate .mat Files with MATLAB

To associate a .mat extension type with MATLAB R2010b or later, use the Microsoft Windows Default Programs control panel.

Was this topic helpful?