Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

See also MATLAB startup - Sydney.

When MATLAB starts, it will look for a file "startup.m" and run it. This file runs a few commands. For example, it might move to the SPM folder, add that folder to the path, and start SPM:

>>

...

cd

...

c:\matlab\spm12
>>

...

addpath

...

c:\matlab\spm12
>>

...

spm

...

fmri

Example:

View file
namestartup.m
height150

Location of startup file

To see the location of the startup file, if it exists:

...

There are two locations it looks for this file: in more recent current versions of MATLAB, it will look in C:\Users\[...]\Documents\MATLAB. This is the preferred place to haev have the startup file. However, it needs to be copied for every user. Another legacy

Option for multi-user computer: Another location is in the MATLAB program files folder C:\Program FIles\MATLAB\[release]\toolbox\local. This does not need to be copied for each user, but it does need to be copied each time MATLAB is updated.

See also MATLAB help.

Editing the startup file

...