|MATLAB Function Reference|
Return root directory of MATLAB installation
returns the name of the directory in which the MATLAB software is installed. In compiled M-code, it returns the path to the executable. Use
matlabroot to create a path to MATLAB and toolbox directories that does not depend on a specific platform or MATLAB version.
rd = matlabroot
returns the name of the directory in which the MATLAB software is installed and assigns it to
produces a full path to the
toolbox/matlab/general directory that is correct for the platform it is executed on.