Start MATLAB program from Linux system prompt
matlab option1 ... optionN
matlab is a Bourne shell script that launches the MATLAB® program from a Linux® system prompt. Here the term
matlab refers to
this script and MATLAB refers to the program.
Determines the MATLAB root folder, the value returned by the
Processes command-line options, if any
Reads the MATLAB startup file,
Sets MATLAB environment variables
matlab launches MATLAB with the specified startup options.
option1 ... optionN
Alternatively, assign startup options in the MATLAB .matlab7rc.sh Startup File. Modifying the
defines startup options every time you start MATLAB.
MATLAB uses the Java® Virtual Machine (JVM™) software to run the desktop and to display graphics. The
-nojvm option enables you to start MATLAB without the JVM. Using this option minimizes memory usage and improves initial
startup speed, but restricts functionality.
option1 ... optionN— One or more startup options
One or more startup options, specified as strings corresponding to valid startup options from the following tables.
Start MATLAB without a controlling terminal. Use this option when you start MATLAB from a window manager menu or desktop icon.
Run the JVM software without opening the MATLAB desktop. You can use development environment tools by calling them as functions.
Use this option to run in batch processing mode.
If you use the
MATLAB provides a command window-only interface in the desktop environment. On the Home tab, click Layout. Then, under Select Layout, select Command Window Only.
Start MATLAB without the JVM software. Features that require Java software (such as the desktop tools and graphics) are not supported.
Disable the display of figure windows in MATLAB.
Do not display the splash screen during startup.
Start the JVM software without starting the MATLAB desktop.
This option does not display X commands. It overrides the
Send X commands to X Window Server display
Execute the specified MATLAB
To set the initial working folder to
The initial working folder is the current folder when MATLAB starts. For more information, see MATLAB Startup Folder.
Set the MATLAB startup folder to
Set the MATLAB startup folder to the value specified by the Initial working folder option in the General Preferences panel.
Start the version of MATLAB in the
Copy Command Window output, including error reports,
Display, without starting MATLAB, the final values of the environment variables and arguments passed to the MATLAB executable. This option also displays other diagnostic information for use when working with a Technical Support Representative.
Display, without starting MATLAB, all environment
variables and their values to standard output. If the exit status
Start MATLAB in debug mode. This option uses the
debugger program name,
Debugger program command-line options,
not add a space between D and
Enable use of the Java debugger. The Java debugger
uses the default
The port number is optional.
However, to use the Java debugger while running multiple MATLAB sessions,
you must specify a port number. The
Display information for debugging X-based problems. Use this option only when working with a Technical Support Representative from MathWorks, Inc.
By default, MATLAB uses the multithreading capabilities of the computer on which it is running.
Limit MATLAB to a single computational thread.
Disable use of
These options control the use of software OpenGL® libraries when MATLAB detects a graphics driver with known issues. For more information, see Graphics Features with OpenGL Requirements.
Force MATLAB to start with software OpenGL libraries.
Disable auto-selection of OpenGL software.
Use the specified license file,
Open student version of MATLAB.
Display startup options without starting MATLAB.
matlab -nojvm -nodisplay -nosplash
matlab -r "disp(['Current folder: ' pwd])"
.matlab7rc.sh shell script contains variable
definitions used by the
.matlab7rc.sh file to redefine variables defined in the
matlab looks in these
folders for the first occurrence of
.matlab7rc.sh in the
To edit the
.matlab7rc.sh file, use the template
located in the
This table lists the variables. For more information, see the
comments in the
Definition and Standard Assignment Behavior
MATLAB checks these values in this order:
Host name of the X Window display MATLAB uses for output
The value of
Final Load library path
The final value is normally a colon-separated list of four sublists, each of which could be empty. The sublists are:
MATLAB root folder
the default computed by the script unless
MATLAB search path
The final value
is a colon-separated list with the
Shell to use with MATLAB “
This value is taken from the environment, unless
Shell to use instead of
MATLAB checks for
an absolute path for the value of
Path of the toolbox folder
The MATLAB version of
matlab script determines the path of the MATLAB root folder by looking up the folder tree from the
/bin folder (where the
matlab script is located). MATLAB use the
MATLAB variable to locate all files within
the MATLAB folder tree.
You can change the definition of
MATLAB. For example, you might change the
To run a different version of MATLAB
When your system uses certain types of automounting schemes and the path
determined by the
matlab script is not correct