Versions Compared

Key

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

...

Code Block
languagematlab
% Starts SPM

% Assume SPM is in the following folder
cd c:\matlab\spm12

% SPM requires the base folder to be added to the path
addpath(pwd)

% Start with fMRI option (the usual one)
spm fmri
Installing or replacing

If there is no startup file, when you start MATLAB the current folder will the the user’s MATLAB folder in Documents.

Example: C:\Users\Noemi\Documents\MATLAB\

Just copy the startup file here.

If MATLAB does run a startup file, to see the location at the Command Prompt:

Code Block
languagematlab
>> which startup
C:\Users\Noemi\Documents\MATLAB\startup.m
>>
Installing for all users (only for computers with lots of people logging on - have to copy each time upgrade MATLAB)

If more than on person uses the computer, the startup file would need to be copied to each user's documents\MATLAB folder, so it may be simpler to place the file in the original, release-specific subfolder. To have MATLAB run the same script for all users:

...