startup
User-defined startup script for MATLAB
Syntax
Description
startup
executes user-specified commands when starting MATLAB®. MATLAB executes any file on the search path named startup
that has an
executable file extension. Examples of an executable file extension are .m
,
.mlx
, and .mlapp
.
Create a startup.m
file in the userpath
folder, which is on the MATLAB search path. Add commands you want executed at startup. For example, your code
might include physical constants, defaults for graphics properties, engineering conversion
factors, or anything else you want predefined in your workspace.
Examples
Tips
To specify the current folder in MATLAB when it starts, set the Initial working folder preference located in the General Preferences page of the Preferences.
Algorithms
At startup, MATLAB automatically executes the matlabrc
function and, if it
exists on the MATLAB search path, startup
. The matlabrc
file,
which is in the matlabroot
/toolbox/local
folder,
is reserved for use by MathWorks® and by system administrators on multiuser systems.
Version History
Introduced before R2006a
See Also
finish
| matlabrc
| matlabroot
| path
| quit
| userpath
| Preferences