Monthly ArchiveAugust 2008
Tips Martin Pyka on 26 Aug 2008
If you use several SPM versions on your system at the same time (e.g. a standard installation and an experimental version of your SPM) it is handy to have a simple visual information about the SPM version you are currently viewing at. You can change the color theme of your SPM installation (the color of the list-component and the buttons, etc.) at the end of the file spm_defaults.m. The variables are
defaults.ui.colour1 = [0.8 0.8 1.0];
defaults.ui.colour2 = [1.0 1.0 0.8];
defaults.ui.colour3 = [0.0 0.0 0.0];
Tips Martin Pyka on 20 Aug 2008
If you need the design matrix of your first level analysis for other applications you can print it out or write it out into a file with Matlab code. All you have to do is: load the SPM.mat file into the workspace and access the right variable.
> SPM.xX.X % this is the designmatrix
> SPM.xX.X(:,1) % this is the first column of your design matrix
> SPM.xX.X(2,:) % this is the second row of your design matrix
You can use the commands fwrite or fprintf for writing these data to a file.
You can find more information about the SPM-struct in the file spm_fMRI_design.m. Just type
> help spm_fMRI_design
to read more about this variable.
Tips Martin Pyka on 19 Aug 2008
If you want to shutdown your PC when your SPM-batch is finished, you should use the Matlab console instead of the SPM-GUI for running your job. Go into the folder where you have saved your batch-job as MAT-file. Then type
> spm_jobman('run', jobs); !shutdown -s -f;
The command !shutdown -s -f is for Windows-users. Linux-users have to type
> spm_jobman('run', jobs); !shutdown -h -now;
When the job is finished your PC will automatically shut down. The exclamation mark indicates that the following command should be executed at the console of your OS. With this trick you could execute any kind of command or program that is installed on your system.