Installation guide

1 Startup and Shutdown
Star tup Options
In this section...
“About Startup Options” on p age 1-12
“Using the Startup File for MATLAB, startup.m” on page 1-12
“Adding Startup Options for Windows Platforms ” o n page 1-13
“Adding Startup Options for UNIX Platforms” on page 1 -14
“Commonly Used Startup Options” on page 1-14
About Startup Options
Yo u can define startup options that instruct MATLAB to perform certain
operations when you start it. You specify these options using a startup file
(
startup.m) or as options to the matlab startup command.
Using the Startup File for MATLAB, startup.m
At startu p, M ATLAB automatically executes the master M-file matlabrc.m
and, if it exists, startup.m.Thefilematlabrc.m,whichisinthe
matlabroot/toolbox/local directory, is reserved for use by The MathWorks
and by the system manager on multiuser systems.
The file
startup.m is for you to specify startup options. For e xample, you can
modify the default search path, predefine variables in your workspace, or
define Handle Graphics
®
defaults. Creating a startup.m file with the lines
addpath /home/$user/mytools
cd /home/
$user/mytools
adds /home/$user/mytools to your default search path and makes mytools
the current directory upon startup.
Location of startup.m
Place the startup.m file in the default or current startup directory, which
is where MAT L A B first looks for it. For more information, see “ S tartup
Directory for MATLAB” on page 1-8.
1-12