MATLAB Function Reference Previous page   Next Page
matlab (Windows)

Start MATLAB (Windows systems)

Syntax

Description

matlab is a starter program (currently a DOS batch script) that starts the main MATLAB executable. (In this document, the term matlab refers to the starter program, 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 the matlab starter program 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 file log. This includes all crash reports.

matlab -minimize starts MATLAB with the desktop minimized. Any desktop tools or documents that were undocked when MATLAB was last closed will not be minimized upon startup.

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 command starts MATLAB and executes the specified MATLAB command. Any required M-file must be on the MATLAB path or in the startup directory.

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

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.

Presetting 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
This is the MATLAB root directory. It is used to determine the location of the MATLAB bin directory. If not defined in the environment, then the location of the script is used.
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

mex

Startup Options in the MATLAB Desktop Tools and Development Environment documentation


Previous page  matlab (UNIX) max Next page

© 1994-2005 The MathWorks, Inc.