Start MATLAB program from macOS Terminal
matlab
is a Bourne shell script that starts the MATLAB® program from a macOS system prompt. Here the term matlab
refers to this script and
MATLAB refers to the program.
The matlab
script is located in the MATLAB application package,
/Applications/
,
where matlabroot
/MATLAB_release
.app/binmatlabroot
is the name of the folder in which you installed
MATLAB and release
is the MATLAB release number.
The matlab
script:
Determines the MATLAB root folder, the value returned by the matlabroot
function
Processes command-line options, if any
Reads the MATLAB startup file, .matlab7rc.sh
Sets MATLAB environment variables
matlab
starts MATLAB with the specified startup options.option1 ... optionN
Alternatively, assign startup options in the MATLAB
.matlab7rc.sh Startup File. Modifying the .matlab7rc.sh
file
defines startup options every time you start MATLAB. On macOS platforms, the .matlab7rc.sh
file applies only when starting
MATLAB from Terminal. The file does not apply when starting MATLAB by double-clicking the MATLAB icon in the Applications folder.
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.