function rootDir = matlabroot
%MATLABROOT Root directory of MATLAB installation.
%   S = MATLABROOT returns 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 1984-2000 The MathWorks, Inc. 
%   $Revision: 5.7 $  $Date: 2000/06/01 04:17:58 $

rootDir = getenv('MATLAB');
