MATLAB Function Reference |

Start MATLAB (UNIX systems only)

**Syntax**

matlab [

|**-h**

] | [**-help**

] [**-n**

arch |**-**

ext |**-**

arch/ext] [**-**

licensefile] [**-c**

Xdisplay |**-display**

] [**-nodisplay**

log] [**-logfile**

] [**-nosplash**

visualid] [**-mwvisual**

] [**-debug**

|**-nodesktop**

] [-runtime] [**-nojvm**

] [**-check_malloc**

MATLAB_command] [**-r**

debugger [options]]**-D**

**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 runtime environment by

- Determining the MATLAB root directory
- Determining the host machine architecture
- Processing any command line options
- Reading the MATLAB startup file,
`.matlab6rc.sh`

- Setting MATLAB environment variables

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

script works:

The `.matlab6rc.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 `.matlab6rc.sh`

. When invoked, `matlab`

looks for the first occurrence of `.matlab6rc.sh`

in the current directory, in the home directory `($HOME)`

, and in the `$MATLAB/bin`

directory, where the template version of `.matlab6rc.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`.matlab6rc.sh`

file. See the comments in the `.matlab6rc.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.)

**Options**

The following table describes `matlab`

command line options.

**See Also**

material | matlabrc |