function rootDir = matlabroot
%MATLABROOT Root directory of MATLAB installation.
%   S = MATLABROOT returns is a string that is the name of the directory
%   where the MATLAB software is installed.
%
%   MATLABROOT is used to produce platform dependent paths
%   to the various MATLAB and toolbox directories.
%
%   Example
%      fullfile(matlabroot,'toolbox','matlab','general','')
%   produces a full path to the toolbox/matlab/general directory that
%   is correct for platform it's executed on.
%
%   See also FULLFILE.

%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 5.4 $  $Date: 1997/11/21 23:35:45 $

rootDir = getenv('MATLAB');
