To customize MATLAB® environment options, create a file
named startup.m
in the matlabroot\toolbox\local
folder
and add commands to it. For example, you can use the startup.m
file
to specify welcome messages, default definitions, or any MATLAB expressions
that you want executed every time you invoke MATLAB. The local
folder
includes a sample startup file, named startupsav.m
,
that you can rename and use as a starting point.
Perform any additional configuration by typing the appropriate
command at the MATLAB command prompt. For example, to automatically
write output from MATLAB to a specific log file, type matlab
-logfile
. "logfilename"