c = [-1 1 0 0 0 0 0 0 0 0 0 0];
cname = 'fase1-basal';
SPM.xCon(end + 1) = spm_FcUtil('Set',cname,'T','c',c(:),SPM.xX.xKXs);
sounds good to me :-)
1st make sure that c as all the columns of your design matrix including
the cste term, meaning that here you should have 5 conditions + 6 motion
regressors + cste ??
2nd and unfortunately i still didn't find how to solve it, if you run
spm_FcUtil whereas no contrast has been estimated yet, the SPM.mat
structure isn't updated and that's why it crashes ; by default I did a
all vs rest for my subjects then ran the contrast batch with spm_FcUtil
maybe someone out there knows how to update the SPM.mat when no contrast
has been performed ??
> Dear Volkmar and spmers
> I've tried to enter contrasts through a Matlab script in SPM5 as I did with
> SPM2 without success.
> What I tried:
> c = [-1 1 0 0 0 0 0 0 0 0 0 0];
> cname = 'fase1-basal';
> SPM.xCon(end + 1) = spm_FcUtil('Set',cname,'T','c',c(:),SPM.xX.xKXs);
> the error message I got:
> ??? Subscripted assignment between dissimilar structures.
> Error in ==> E:\ESTUDIS\epilepsia\fmri_ictal\p1_280507
> On line 67 ==> SPM.xCon(end + 1) = spm_FcUtil('Set',cname,'T','c',c
> Could you please give a clue how to do it. I am runnig SPM5 on Matlab 6.5
> Many thanks
> Carles Falcon
> IDIBAPS- Hospital Clinic of Barcelona
> Biophysics Unit. University of Barcelona