SPM/Installation on Windows

From Wikibooks, the open-content textbooks collection

< SPM
Jump to: navigation, search


Contents

[edit] Preamble

Installing SPM on Windows 32 bit (XP, Vista, 7) should be relatively straightforward. Two common pitfalls common to all versions of SPM:

  • If you use WinZip to unpack SPM's *.tar.gz archives, make sure to uncheck "Tar file smart CR/LF conversion", which is under the "miscellaneous" tab in "configuration" under "options", as it could corrupt some of SPM files otherwise. 7-Zip is a good open source software alternative.
  • It is not recommended to install SPM in MATLAB's toolbox folder as MATLAB toolbox directories can be cached and changes in SPM files (such as updates) might not appear when using SPM.

[edit] SPM8

[edit] Installation

  • 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

[edit] Compilation

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

[edit] SPM5

[edit] Installation

  • Download spm5.tar.gz, its updates Updates_xxxx.tar.gz
  • Unzip spm5.tar.gz in a folder of your choice, such as C:\spm\spm5) and unzip Updates_xxxx.tar.gz 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\spm5

in MATLAB's workspace.

  • Launch SPM by typing
>> spm

[edit] Compilation

See Compilation of SPM5 MEX files on Windows.

[edit] SPM2

[edit] Installation

  • 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

[edit] Compilation

See Compilation of SPM2 MEX files on Windows.