Introducing SPM¶
SPM (Statistical Parametric Mapping) is a MATAB toolobox designed for the analysis of brain imaging data such as MRI/fMRI, MEG and EEG. It has been developed by the Imaging Neuroscience methods team at UCL since the early 1990s. SPM provides a set of functions that you can access from the MATAB command line or through a graphical user interface (GUI).
Installing SPM¶
Option 1 - If you are using Desktop@UCL Anywhere¶
SPM is already available in a special network folder set up for our course. We just need to let MATAB know where to find it. To do that, run MATAB, copy the following code into the MATAB command window and press Enter:
addpath('S:\FBS_CLNE0068\SPM');
fid = fopen('N:\Documents\MATLAB\startup.m','w');
fprintf(fid, 'addpath(''S:\\FBS_CLNE0068\\SPM'');');
fclose(fid);
Option 2 - If you want to install SPM on your own computer¶
Click to see the instructions
1. Download SPM.zip file from the link on the course Moodle page (in `Data analysis resources` section). 2. Double-click the downloaded `SPM.zip` file to navigate into it. 3. Drag the `SPM` folder from inside the zip file to where you want to keep it. `Documents\MATLAB` would be a good location. Once the copying is complete, open MATAB and type the following command in the command window: This assumes you copied the SPM folder to `C:\Users\yourusername\Documents\MATLAB`. You need to replace `yourusername` with your actual user name. If you put it somewhere else, change the path accordingly. To make this change permanent, you can save the path by typing: Note that you need to duplicate the backslashes (`\`) in the path within the `fprintf` function.Testing the installation¶
- To check that SPM is installed correctly, restart MATLAB and type the following command in the MATAB command window:

Figure: SPM (Statistical Parametric Mapping) software graphical user interface (GUI) for fMRI analysis