Print

Print


Dear Guillaum,
 
I just try to run the modified script you wrote for Tao, the n got the error message as follows. But I don't know what I did wrong with it, pls give me some advice. Thanks in advance.
 
Haibo
 
>>spm_jobman('run',jobs)
--------------------------
Running "Contrast Manager"
   Changing directory to: F:/luosisi-total-result/conjunction-analysis-test/4conds-test/4-flexible-factorial/special-all
??? Reference to non-existent field 'swd'.
Error in ==> spm_config_contrasts>setupcon at 540
if ~strcmp(pth,SPM.swd)
Error in ==> spm_jobman>run_struct1 at 1585
        feval(prog,val);
Error in ==> spm_jobman>run_struct1 at 1595
            run_struct1(c.val{i},gui);
Error in ==> spm_jobman>run_struct1 at 1595
            run_struct1(c.val{i},gui);
Error in ==> spm_jobman>run_job at 480
    run_struct1(c,gui);
Error in ==> spm_jobman at 89
            run_job(varargin{2});


--------------------------
My multicontrast.m as follows:
 
%There is no "Multiple Contrasts" option like with "Multiple Conditions" or  "Multiple Regressors"
%but this can easily be done with a script:
% Define as many T-contrasts as you want
contrasts(1).name = 'S-sample';
contrasts(1).convec = [1 0];
contrasts(2).name = 'A-sample';
contrasts(2).convec = [0 1];
contrasts(3).name = 'D-sample';
contrasts(3).convec = [0 0 1];
contrasts(4).name = 'I-sample';
contrasts(4).convec = [0 0 0 1];
% Specify and estimate new T-contrasts
spm('Defaults','fMRI');
clear jobs
jobs{1}.stats{1}.con.spmmat = cellstr('F:/luosisi-total-result/conjunction-analysis-test/4conds-test/4-flexible-factorial/special-all/SPM.mat');
for i=1:length(contrasts)
    jobs{1}.stats{1}.con.consess{i}.tcon = contrasts(i);
end
spm_jobman('run',jobs);
 
 
 
 


> Date: Sat, 28 Jun 2008 18:02:01 +0200
> From: [log in to unmask]
> Subject: Re: [SPM] spm5 use
> To: [log in to unmask]
>
> Dear Guillaum,
>
> Thank you again for your proposition of the code, that helps very much in my
> first level analysis ;
>
> one remark :
> since I have done several condition estimates, after each estimation, I
> have renamed the folder. It's a little strange for me to see that with the
> following code I have found the spm file in new path but the results of
> comparison is written in the origin creation folder. Is it right ? Is there
> some way to ask spm to write the results in the same folder where it finds
> spm.mat ?
>
> two other quesitons :
>
> 1) Would you please suggest me the similar code for the 2nd level analysis,
> 2) Is there a some document to learn these spm codes ?
>
> I appreciate very much you help !
> Tao
>
> --------------------------------
> Dr. Tao JIANG
> CESG-CNRS
> 15 Rue H. Picardet
> 21000 DIJON France
> Tél : 00 33 3 80 68 16 11
>
>
> ----- Original Message -----
> From: "Guillaume Flandin" <[log in to unmask]>
> To: <[log in to unmask]>
> Sent: Wednesday, June 18, 2008 7:08 PM
> Subject: Re: [SPM] spm5 use
>
>
> > Dear Tao,
> >
> > There is no "Multiple Contrasts" option like with "Multiple Conditions" or
> > "Multiple Regressors" but this can easily be done with a script:
> >
> > % Define as many T-contrasts as you want
> > contrasts(1).name = 'Name_Contrast_1';
> > contrasts(1).convec = [1 0];
> > contrasts(2).name = 'Name_Contrast_2';
> > contrasts(2).convec = [0 1];
> >
> > % Specify and estimate new T-contrasts
> > spm('Defaults','fMRI');
> > clear jobs
> > jobs{1}.stats{1}.con.spmmat = cellstr('/path/to/SPM.mat');
> > for i=1:length(contrasts)
> > jobs{1}.stats{1}.con.consess{i}.tcon = contrasts(i);
> > end
> > spm_jobman('run',jobs);
> >
> > I hope this helps,
> > Guillaume.
> >
> > jiang wrote:
> >> Dear SPM5 users,
> >>
> >> I would like to know whether there is a method to enter the several T
> >> tests contrasts at the same time, a little like to enter multiconditions
> >> ?
> >> thank you for your help !
> >> Tao
> >
> > --
> > Guillaume Flandin, PhD
> > Wellcome Trust Centre for Neuroimaging
> > University College London
> > 12 Queen Square
> > London WC1N 3BG
> >
> >
> >



使用新一代 Windows Live Messenger 轻松交流和共享! 立即体验!