startup.mFile on Any Platform
startup.m file is for specifying startup
options. You can add folders to the search path by including
startup.m. For example, to add the specified
the search path, include this statement:
For more information, see Startup Options.
MATLABPATHEnvironment Variable on UNIX or Macintosh
On UNIX® and Macintosh platforms, you can define a
userpath by setting the
variable. By default, MATLAB® adds
the search path upon startup.
This example shows how to add two folders,
to the search path upon startup on a UNIX platform. The procedure
is similar for Macintosh platforms.
userpath is set to the default value
on a UNIX platform with a csh shell, where
your home folder. That is, the primary
In a terminal, set the
variable. Separate multiple folders using a colon (
setenv MATLABPATH '/home/j/Documents/MATLAB/mine':'/home/j/Documents/MATLAB/mine/research'
MATLABPATH home/j/Documents/MATLAB home/j/Documents/MATLAB/mine home/j/Documents/MATLAB/mine/research home/j/Applications/MATLAB/R2009a/toolbox/matlab/general home/j/Applications/MATLAB/R2009a/toolbox/matlab/ops ...
The two folders,
are set as the secondary
are both added to the search path upon startup, as long as the shell
runs. To set the secondary
all future MATLAB sessions, set the
variable in your startup script.