MATLAB: How to access the path directory to a MATLAB toolbox on OS X

MATLAB

I have MATLAB installed in the Applications folder on my Mac, and I would like to access the contents of the installation, such as a MATLAB function from one of the toolboxes.

Best Answer

The MATLAB installation directory can be found by executing the following in the MATLAB command prompt:
 
matlabroot
Starting from MATLAB 7.7 (R2008b), MATLAB default installation directory on the MAC OS is
 
/Applications/MATLAB_[Release].app
where [Release] is the MATLAB Release's version, i.e., R2008b, R2009a, etc.
The contents of the .app directory cannot be accessed by browsing through the 'Set Path' GUI in the File menu. To add the directories under .app directory to the path, use ADDPATH and SETPATH commands. For more information on the ADDPATH and SETPATH commands, please refer to the documentation by executing the following in the MATLAB command prompt:
help addpath
help setpath