Global-Task Correlations

calls sm_gltaskcorr2
Computes the correlations between the different task 
conditions and the global brain mean intensity.

This function computes the correlation between the global variate (mean
activation in each scan) and the design conditions (columns of the design
matrix), with possibility to collapse over different sessions.

FORMAT sm_gltaskcorr(matfile, collapse, image_files)

matfile - name of design matrix .mat file
collapse (0/1) whether to collapse columns with same name across sessions
or not. default - ask.
image_files - cell array of masks for image files for each session. e.g.:
image_files = { {'001/sw*.img'} , ...
                {'002/sw*.img'} };
the number of sessions in image_files must match that of the specified
design matrix.
The utility assumes that the specified SPM design matrix contains the
following:
SPM.Sess(i).U(j).name - the name of condition j in session i (conditions
with identical names will be collapsed across sessions if collapse=1).
SPM.Sess(i).col - the columns in the design matrix corresponding to
session i.
SPM.Sess(i).row - the rows in the design matrix corresponding to session i.
SPM.xX.name - the name of each column in the design matrix
SPM.xX.X - the design matrix

This utility should work with both SPM2 and SPM5
Shay Mozes 04/2007
