MATLAB Function Reference    
matlabroot

Return root directory of MATLAB installation

Syntax

Description

matlabroot returns the name of the directory in which the MATLAB software is installed.

rd = matlabroot returns the name of the directory in which the MATLAB software is installed and assigns it to rd.

Examples

fullfile(matlabroot,'toolbox','matlab','general','')

produces a full path to the toolbox/matlab/general directory that is correct for the platform it is executed on.


 matlabrc max