Jump to content

SPM/Installation on Windows

From Wikibooks, open books for an open world
< SPM

Preamble

[edit | edit source]

Installing SPM on Windows 32 bit (XP, Vista, 7) should be relatively straightforward. Common pitfalls can be found in the description of the 64bit Windows installation.

SPM12

[edit | edit source]

Installation

[edit | edit source]
  • Download spm12.zip.
  • Unzip spm12.zip in a folder of your choice, such as C:\Users\login\Documents\MATLAB\spm12).
  • Start MATLAB and add SPM into your path, either using File > Set Path > Add Folder... or typing
>> addpath C:\Users\login\Documents\MATLAB\spm12

in MATLAB's workspace.

  • Launch SPM by typing
>> spm

You might have to install the VC++ 2005 and 2008 Redistributable Packages (vcredist_x86.exe) from Microsoft:

Update

[edit | edit source]

If you have just downloaded the spm12.zip archive, it already contains the latest set of updates. To update SPM when a new version is released:

  • Download spm12_updates_rxxxx.zip
  • Unzip spm12_updates_rxxxx.zip on top of the folder containing your SPM installation so that newer files overwrite existing files.

Alternatively, you can use the spm_update.m function:

>> spm_update

If a new version is available, it can be applied to your local installation by typing:

>> spm_update update

Compilation

[edit | edit source]

Precompiled MEX files (*.mexw32) are provided with SPM12 and you shouldn't need to recompile them by yourself.

Installation

[edit | edit source]
  • Download spm8.zip and its updates spm8_updates_rxxxx.zip
  • Unzip spm8.zip in a folder of your choice, such as C:\spm\spm8, and unzip spm8_updates_rxxxx.zip on top of it so that newer files overwrite existing files.
  • Start MATLAB and add SPM into your path, either using File > Set Path > Add Folder... or typing
>> addpath C:\spm\spm8

in MATLAB's workspace.

  • Launch SPM by typing
>> spm

Compilation

[edit | edit source]

Precompiled MEX files (*.mexw32) are provided with SPM8 and you shouldn't need to recompile them by yourself.

See Compilation of SPM8 MEX files on Windows if needed.

Installation

[edit | edit source]
  • Download spm5.zip.
  • Unzip spm5.zip in a folder of your choice, such as C:\spm\spm5.
  • Start MATLAB and add SPM into your path, either using File > Set Path > Add Folder... or typing
>> addpath C:\spm\spm5

in MATLAB's workspace.

  • Launch SPM by typing
>> spm

Compilation

[edit | edit source]

Precompiled MEX files (*.mexw32) are provided with SPM5 and you shouldn't need to recompile them by yourself.

See Compilation of SPM5 MEX files on Windows if needed.

Installation

[edit | edit source]
  • Download spm2.tar.gz and its updated MEX files SPM2_R2007a_XP_MEX.zip
  • Unzip spm2.tar.gz in a folder of your choice, such as C:\spm\spm2, and unzip SPM2_R2007a_XP_MEX.zip on top of it so that newer files overwrite existing files.
  • Start MATLAB and add SPM into your path, either using File > Set Path > Add Folder... or typing
>> addpath C:\spm\spm2

in MATLAB's workspace.

  • Launch SPM by typing
>> spm

Compilation

[edit | edit source]

Precompiled MEX files (*.mexw32) are provided with SPM2 and you shouldn't need to recompile them by yourself.

See Compilation of SPM2 MEX files on Windows.