Hi Marko,
Just going through some old list messages... Did you ever get a reply
to this? Any luck?
I wonder if the following might help
spmmat = spm_select(1, 'mat', 'select SPM.mat');
SPM = load(spmmat);
X = SPM.xX.X; % original design matrix
C = find(all(X == 1));
that should return the column number corresponding to the constant, in
case it isn't always last, which it might be for all I know...
Then you could do something like
direc = spm_fileparts(spmmat);
bimg = fullfile(direc, sprintf('beta_%04d.img', C));
to get the filename of the corresponding beta image.
Best,
Ged.
Marko Wilke wrote:
> Dear All,
>
> this is just to confirm my guess that the constant term as modelled by
> SPM will always be modelled last.
>
> Background is, I want to explore local % signal change according to
> Will's suggestion at
> http://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind04&L=SPM&D=0&P=344672
> and was thinking about playing with spm_select(...'list'...) to
> automatically select the "highest" beta image.
>
> Thanks in advance,
> Marko
|