MATLAB Function Reference
  Go to function:
    Search    Help Desk 
matlabrc    Examples   See Also

MATLAB startup M-file

Syntax

Description

At startup time, MATLAB automatically executes the master M-file matlabrc.m and, if it exists, startup.m. On multiuser or networked systems, matlabrc.m is reserved for use by the system manager. The file matlabrc.m invokes the file startup.m if it exists on MATLAB's search path.

As an individual user, you can create a startup file in your own MATLAB directory. Use the startup file to define physical constants, engineering conversion factors, graphics defaults, or anything else you want predefined in your workspace.

Algorithm

Only matlabrc is actually invoked by MATLAB at startup. However, matlabrc.m contains the statements:

that invoke startup.m. Extend this process to create additional startup M-files, if required.

Remarks

You can also start MATLAB using options you define at the command line or in your Windows shortcut for MATLAB. See Chapter 2 of Using MATLAB for details.

Examples

Example 1 - Specifying the Default Editor for UNIX

For UNIX platforms, you can include the system_dependent command in your startup.m file, or your matlabrc.m file if you have access to it. Then when you use edit for M-files, your default UNIX editor, for example Emacs, is used instead of the MATLAB Editor. The sample matlabrc.m file, included with MATLAB, already contains this command but it is commented out. If you want to use your UNIX editor when you use edit, copy these lines to your startup.m file and remove the comment marks.

Example 2 - 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.

See Also

exist, path, quit, startup



[ Previous | Help Desk | Next ]