How Matlab knows where to find FUNCTIONS and DATA FILES
Matlab uses the following steps to determine what a name you specify (on
the command line or in a function) is
a. checks to see if 'name' is a variable
b. checks for 'name' as a built-in function
c. checks to see if 'name' is a file in the current directory
(name.m or name.mat for load command)
d. searches the directories specified by the environment
variable MATLABPATH. This variable is set in the Matlab
script to include all the Matlab Toolbox directories and
some local contrib directories. Also included is the
directory ~/matlab if it exists. For information on how
to modify this variable, check the answer titled "How to
modify the MATLABPATH variable" under the Matlab topic.
|