Thank you for the solution however we are running SPM5 and it doesnt
work under 5,
what we got was :
spm_contrasts(SPM);
??? Error using ==> spm_FcUtil
not contrast dim. in spm_FcUtil c
Could anyone helps us with similar script for SPM5,
Best,
Artur
PESENTI Mauro napisaĆ(a):
> LLN, le 13/02/06
>
> Dear Artur,
>
> I don't know if this is the best/easiest/more elegant way to do it,
> but the following lines of code create new contrasts and add them to
> the last one found.
>
> - paste the lines in a "filename.m" file,
> - duplicate lines 2-4 for each contrast and adapt "contrast_name" and
> "contrast_weights" with your contrast specifications,
> - put the "filename.m" file in the directory of your analysis,
> - once the model has been estimated, simply type "filename" at the
> matlab prompt (make sure you're in the good directory!).
>
> This works for us with SPM2.
>
> Yours,
>
> Mauro.
>
> -------------------------
> load SPM.mat
>
> cname='contrast_name'; % e.g.,'Cond1-Cond2'
> c=[contrast_weights]; % e.g., [1 0 1 0 1 0 1 0 zeros(1,4)]
> SPM.xCon(end + 1)=spm_FcUtil('Set',cname,'T','c',c(:),SPM.xX.xKXs);
>
> spm_contrasts(SPM);
> -------------------------
>
>> Dear SPMers,
>>
>> After creating SPM.mat for one subject we set 52 different T
>> contrasts (that number is huge because we have great number of
>> condition).
>>
>> We would like to use those contrast in case of every subject. What we
>> tried to do was coping the xCon from one SPM.mat to another but it
>> failed.
>>
>> Could somebody help us with that our programming knowledge if quite
>> poor so we are looking for simple solution.
>>
>> Best,
>>
>> --
>> Artur Marchewka
>>
>> Department of Neurophysiology
>> The Nencki Institute of Experimental Biology
>> Pasteur 3, 02-093 Warsaw, Poland
>> tel: +4822 5892392
>> fax: +4822 8225342
>> email: [log in to unmask]
>> website: http://www.nencki.gov.pl/labs/pslab/index.htm
>
>
>
--
Artur Marchewka
Department of Neurophysiology
The Nencki Institute of Experimental Biology
Pasteur 3, 02-093 Warsaw, Poland
tel: +4822 5892392
fax: +4822 8225342
email: [log in to unmask]
website: http://www.nencki.gov.pl/labs/pslab/index.htm
|