At startup time, MATLAB? automatically executes the file matlabrc.m. This function establishes the MATLAB path, sets the default figure size, and sets some uicontrol defaults.
On multiuser or networked systems, system administrators can put messages, definitions, or other code that applies to all users in theirmatlabrc.m file.
The file matlabrc.m invokes the startup.m file, if it exists on the search path MATLAB uses.
Individual users should use the startup.m file to customize MATLAB startup. The matlabrc.m file, located in thematlabroot/toolbox/local folder, is reserved for system administrators.
Examples
Turning Off the Figure Window Toolbar
If you do not want the toolbar to appear in the figure window, remove the comment marks from the following line in the matlabrc.m file, or create a similar line in your own startup.m file.
% set(0,'defaultfiguretoolbar','none')=======================================================================startupexecutes commands of your choosing when the MATLAB? program starts.
Create a startup.m file in your MATLAB Startup Folder and put in the file any commands you want executed at MATLAB startup. For example, your startup.m file might include physical constants, defaults for Handle Graphics? properties, engineering conversion factors, or anything else you want predefined in your workspace.
see also:(preferences)
http://www.mathworks.com/help/matlab/matlab_env/preferences.html