matlab - script file for invoking MATLAB


matlab [-h | -help] | [-n]

[[-c licensefile] -display hostname:display] [-debug]

[-Debugger [options]]


matlab is a Bourne shell script that starts the MATLAB executable (note lower case matlab refers here to the script and upper case MATLAB refers to the application program). Before actually initiating the execution of MATLAB, this script configures the runtime environment by:
There are two ways in which you can control the way the matlab script works:
The file is a shell script that 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 When called, matlab looks for the first occurance of in the current directory, in the $HOME directory, and in the matlab/bin directory (where the template version of is located). You can edit the template file to redefine information used by the matlab script. You can copy the edited version to your current or home directory if you do not want your changes applied system wide. Ensure that you edit the section that applies to your machine architecture. The file defines the following variables: ______________________________________________________

Variable What It Defines


MATLAB The MATLAB root directory AUTOMOUNT_MAP Path prefix map for automounting DISPLAY The hostname of the X Window display MATLAB uses for output ARCH The machine architecture as determined by the arch utility script LM_LICENSE_FILE

The FLEXlm license file (not used by Convex or Cray platforms). TOOLBOX Path to the $MATLAB/toolbox directory MATLABPATH The MATLAB search path XAPPLRESDIR The X application resource directory $MATLAB/app-defaults XKEYSYMDB The X keysym database file $MATLAB/app-defaults/XKeysymDB SHELL The shell to use when "!" is issued in MATLAB ------------------------------------------------------- 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 may happen when certain types of automounting schemes are used by your system). You can also set $MATLAB as an argument to the matlab script. $AUTOMOUNT_MAP is used to modify the MATLAB root directory path. Whatever pathname that is assigned to $AUTOMOUNT_MAP is deleted from the front for the MATLAB root path. (It is unlikely that you will need to use this option.) See the comments in the file for more explanation on these variables.


This option shows matlab command usage. MATLAB is not started when you specify this option.
This option causes matlab to display the values of the environment variables used by MATLAB. MATLAB is not started when you specify this option.
Sets the value of the LM_LICENSE_FILE variable to licensefile. This setting supersedes values specified in and the default values defined within the matlab script. When you start MATLAB with this option, only the file licensefile used. If you want to specify multiple license files (for exammple, if you have beta software with demo licenses), you can concatenate the file names using colons to separate each path. For example,
If you do not use the -c option, MATLAB automatically concatenates all the license.dat files in the matlab/etc directory.
The X display used for MATLAB output. For example, matlab -display falstaff:0 cause MATLAB output to be displayed on the host named falstaff. The value specified with this option supersedes the value of the DISPLAY environment variable and the display variable defined in
Provides debugging information, especially for X-based problems. Note that your should use this option only in conjunction with a Technical Support Representative from The MathWorks, Inc.
Start MATLAB with the specified debugger (e.g., dbx, xdb, gdb, ups, etc.). Any debugger options you want to use should be specified in options. Using the -D options sets the environment variable:
Note that for certain debuggers, such as gdb, the SHELL environment variable is always set to /bin/sh. This option is useful for using a debugger on MEX-files, which are subroutines linked to MATLAB. You should build the MEX-file using the -g option. (See the cmex and fmex manual pages for information on building MEX-files. See the MATLAB Release Notes Version 4.2 for information on debugging MEX-files).


See the MATLAB Installation Guide for information on installing MATLAB. See the MATLAB Reference Manual and the MATLAB User's Guide for information on using MATLAB or contact, The MathWorks, Inc. Cochituate Place 24 Prime Park Way Natick, MA 01760 508-653-1415