This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the 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 Mac Terminal
matlab (Linux) Start MATLAB program from Linux system prompt
exit Terminate MATLAB program (same as quit)
quit Terminate MATLAB program
matlabrc Start up file for MATLAB program
startup Start up file for user-defined options
finish Termination file for MATLAB program


Start MATLAB on Windows Platforms

There are several ways to start MATLAB® on a Microsoft® Windows® platform.

Start MATLAB on Linux Platforms

To start MATLAB on Linux® platforms, type matlab at the operating system prompt.

Start MATLAB on Mac Platforms

Learn how to start MATLAB from the Applications folder.

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.


Exit MATLAB using several methods.

Commonly Used Startup Options

There are several commonly used startup options for the matlab command.

MATLAB Startup Folder

By default, MATLAB sets the initial working folder (startup folder) based on the method you use to start MATLAB.

Associating Files with MATLAB on Windows Platforms

When you install MATLAB on Windows platforms, the installer sets up associations between certain file types and MathWorks® products.


Recovering Data After an Abnormal Termination

If MATLAB terminates unexpectedly, 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, 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.

Cannot Associate .m Files with MATLAB on Windows

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?