MATLAB Function Reference |
Syntax
matlab helpOption matlab archOption matlab dispOption matlab modeOption matlab mgrOption matlab-c
licensefile matlab-r
MATLAB_command matlab-logfile
filename matlab-mwvisual
visualid matlab-nosplash
matlab-timing
matlab-debug
matlab-D
debugger options
Note
You can enter more than one of these options in the same MATLAB command. If you use -D debugger to start MATLAB in debug mode, the first option in the command must be -D debugger .
|
Description
matlab
is a Bourne shell script that starts the MATLAB executable. (In this document, matlab
refers to this script; MATLAB refers to the application program). Before actually initiating the execution of MATLAB, this script configures the run-time environment by
.matlab7rc.sh
There are two ways in which you can control the way the matlab
script 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.
matlab archOption
starts MATLAB and assumes that you are running on the system architecture specified by arch
, or using the MATLAB version specified by variant
, or both. The values for the archOption
argument are shown in the table below. Enter only one of these options in a matlab
command.
matlab dispOption
starts MATLAB using one of the display options shown in the table below. Enter only one of these options in a matlab
command.
matlab modeOption
starts MATLAB without its desktop or Java virtual machine components. Enter only one of the options shown below.
Option |
Description |
-nodesktop |
Do not start the MATLAB desktop. Use the current window for commands. The Java virtual machine will be started. |
matlab mgrOption
starts MATLAB in the memory management mode specified by mgrOption
. Enter only one of the options shown below.
matlab
starts MATLAB using the specified license file. The -c
licensefile
licensefile
argument can have the form port@host
or it can be a colon-separated list of license filenames. This option causes the LM_LICENSE_FILE
and MLM_LICENSE_FILE
environment variables to be ignored.
matlab
starts MATLAB and executes the specified MATLAB -r
command
command
.
matlab
starts MATLAB and makes a copy of any output to the command window in file log. This includes all crash reports.-logfile
filename
matlab
starts MATLAB and uses -mwvisual
visualid
visualid
as the default X visual for figure windows. visualid
is a hexadecimal number that can be found using xdpyinfo
.
matlab
starts MATLAB but does not display the splash screen during startup.-nosplash
matlab
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 shell window in which MATLAB is started. This option should be used only when working with a Technical Support Representative from The MathWorks, Inc. (This option applies to -timing
glnx86
systems only.)
matlab
starts MATLAB and displays debugging information that can be useful, especially for X based problems. This option should be used only when working with a Technical Support Representative from The MathWorks, Inc.-debug
matlab
starts MATLAB in debug mode, using the named -D
debugger options
debugger
(e.g., dbx
, gdb
, dde
, xdb
, cvd
). A full path can be specified for debugger.
The options
argument can include only those options that follow the debugger name in the syntax of the actual debug command. For most debuggers, there is a very limited number of such options. Options that would normally be passed to the MATLAB executable should be used as parameters of a command inside the debugger (like run
). They should not be used when running the MATLAB script.
If any other matlab
command options are placed before the -D
debugger
argument, they will be handled as if they were part of the options after the -D
debugger
argument and will be treated as illegal options by most debuggers. The MATLAB_DEBUG
environment variable is set to the filename part of the debugger argument.
To customize your debugging session, use a startup file. See your debugger documentation for details.
Specifying Options in the MATLAB Startup File
The .matlab7rc.sh
shell script contains definitions for a number of variables that the matlab
script uses. These variables are defined within the matlab
script, but can be redefined in .matlab7rc.sh
. When invoked, matlab
looks for the first occurrence of .matlab7rc.sh
in the current directory, in the home directory ($HOME)
, and in the $MATLAB/bin
directory, where the template version of .matlab7rc.sh
is located.
You can edit the template file to redefine information used by the matlab
script. If you do not want your changes applied systemwide, copy the edited version of the script to your current or home directory. Ensure that you edit the section that applies to your machine architecture.
The following table lists the variables defined in the.matlab7rc.sh
file. See the comments in the .matlab7rc.sh
file for more information about these variables.
Variable |
Definition and Standard Assignment Behavior |
ARCH |
The value |
AUTOMOUNT_MAP |
Path prefix map for automounting. The value set in |
DISPLAY |
The hostname of the X Window display MATLAB uses for output. The value of |
LD_LIBRARY_PATH |
Final Load library path. The name The final value is normally a colon-separated list of four sublists, each of which could be empty. The first sublist is defined in |
LM_LICENSE_FILE |
The license file value passed with the Later in the MATLAB script if the |
MATLAB |
The default computed by the script is used unless Currently |
MATLAB_DEBUG |
Normally set to the name of the debugger. The |
MATLAB_JAVA |
The path to the root of the Java Runtime Environment. The default set in the script is used unless |
MATLAB_MEM_MGR |
Turns on MATLAB memory integrity checking. The |
MATLABPATH |
The final value is a colon-separated list with the |
SHELL |
The shell to use when the " This is taken from the environment unless |
TOOLBOX |
Path of the toolbox directory. A nonempty value in the environment is used first. Otherwise, |
XAPPLRESDIR |
The X application resource directory. A nonempty value in the environment is used first unless |
XKEYSYMDB |
A nonempty value in the environment is used first unless |
The matlab
script determines the path of the MATLAB root directory by looking up the directory tree from the $MATLAB/bin
directory (where the matlab
script is located). The MATLAB
variable is then used to locate all files within the MATLAB directory tree.
You can change the definition of MATLAB
if, for example, you want to run a different version of MATLAB or if, for some reason, the path determined by the matlab
script is not correct. (This can happen when certain types of automounting schemes are used by your system.)
AUTOMOUNT_MAP
is used to modify the MATLAB root directory path. The pathname that is assigned to AUTOMOUNT_MAP
is deleted from the front of the MATLAB root path. (It is unlikely that you will need to use this option.)
See Also
Startup Options in the MATLAB Desktop Tools and Development Environment documentation
matlabroot | matlab (Windows) |
© 1994-2005 The MathWorks, Inc.