matlab (Windows) - Start MATLAB® program (Windows® systems)

Syntax

matlab helpOption
matlab mgrOption
matlab -automation
matlab -c licensefile
matlab -logfile filename
matlab -nosplash
matlab -noFigureWindows
matlab -r "statement"
matlab -regserver
matlab -sd "startdir"
matlab -timing
matlab -unregserver

Description

matlab is a script that runs the main MATLAB executable. (In this document, the term matlab refers to the script, and MATLAB refers to the main executable). Before actually initiating the execution of MATLAB, it configures the run-time environment by

There are two ways in which you can control the way matlab works:

Specifying Options at the Command Line

Options that you can enter at the command line are as follows:

matlab helpOption displays information that matches the specified helpOption argument without starting MATLAB. helpOption can be any one of the keywords shown in the table below. Enter only one helpOption keyword in a matlab command.

Values for helpOption

Option

Description

-help

Display matlab command usage.

-h

The same as -help.

-?

The same as -help.

matlab mgrOption starts MATLAB in the memory management mode specified by mgrOption. Enter only one of the options shown below.

Values for mgrOption

Option

Description

-memmgr manager

Set environment variable MATLAB_MEM_MGR to manager. The manager argument can have one of the following values:

  • cache — The default.

  • fast — For large models or MATLAB code that uses many structure or object variables. It is not helpful for large arrays.

  • debug — Does memory integrity checking and is useful for debugging memory problems caused by user-created MEX files.

-check_malloc

The same as using '-memmgr debug'.

matlab -automation starts MATLAB as an automation server. The server window is minimized, and the MATLAB splash screen is not displayed on startup.

matlab -c licensefile starts MATLAB using the specified license file. The licensefile argument can have the form port@host. This option causes the LM_LICENSE_FILE and MLM_LICENSE_FILE environment variables to be ignored.

matlab -logfile filename starts MATLAB and makes a copy of any output to the Command Window in filename. This includes all crash reports.

matlab -nosplash starts MATLAB but does not display the splash screen during startup.

matlab -noFigureWindows starts MATLAB but disables the display of any figure windows in MATLAB.

matlab -r "statement" starts MATLAB and executes the specified MATLAB statement. Any required file must be on the MATLAB search path or in the startup directory.

matlab -regserver registers MATLAB as a Component Object Model (COM) server.

matlab -sd "startdir" specifies the startup directory for MATLAB (the current directory in MATLAB after startup). The -sd option has been deprecated. For information about alternatives, see Startup Directory (Folder) on Windows® Platforms.

matlab -timing starts MATLAB and prints a summary of startup time to the command window. This information is also recorded in a timing log, the name of which is printed to the MATLAB Command Window. This option should be used only when working with a Technical Support Representative from The MathWorks.

matlab -unregserver removes all MATLAB COM server entries from the registry.

Setting Environment Variables

You can set any of the following environment variables before starting MATLAB.

Variable Name

Description

LM_LICENSE_FILE

This is the FLEX lm license variable. The license file value passed with the -c argument to the script is used; otherwise it is the value set in the environment. The final value is a colon-separated list of license files and/or port@host entries.

MATLAB_MEM_MGR

This determines the type of memory manager used by MATLAB. If not set in the environment, it is controlled by passing its value via the '-memmgr' option. If no value is predefined, then MATLAB uses 'cache'.

See Also

matlab (UNIX), mex, userpath

Starting the MATLAB® Program on Windows® Platforms, and Startup Options in the MATLAB Desktop Tools and Development Environment documentation

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS