Dear Carles
I had the same problem when moving from SPM2 to SPM5 and Volkmar is
right, SPM.xCon
doesn't seem to be initialised automatically - it can be done 'by hand' eg:
SPM.xCon = struct( 'name',{{'init'}}, 'STAT', [1], 'c', [1], 'X0', [1], ...
'iX0', {{'init'}}, 'X1o', [1], 'eidf', [], 'Vcon', [],
'Vspm', [] );
- then use FcUtil('Set' etc
HTH
Alexa
Quoting Volkmar Glauche <[log in to unmask]>:
[Hide Quoted Text]
Dear Carles,
without looking into SPM code right now, I think MATLAB is complaining
about SPM.xCon (before adding your contrast) not having the same format
as the return argument of spm_FcUtil. This may happen if SPM.xCon is
empty (i.e. you are creating the first contrast), or if the order of
fields in the existing SPM.xCon struct is different from the order in
the struct returned from spm_FcUtil.
You should read (and perhaps also use) spm_config_contrasts to create
your contrasts - it should be fairly easy to create the appropriate job
structure in MATLAB and then call spm_jobman('run', ...) to compute
your contrasts.
Volkmar
On Tue, 4 Sep 2007, CARLES M. FALCON FALCON wrote:
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
\comun\contrastos_funcfMRI_fases_spm5.m
On line 67 ==> SPM.xCon(end + 1) = spm_FcUtil('Set',cname,'T','c',c
(:),SPM.xX.xKXs);
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
Missatge de Volkmar Glauche <[log in to unmask]>:
Assuming you are using SPM5, there is a contrast manager batch facility,
which should help you with this. Alternatively, you could write a MATLAB
script to call spm_contrasts directly.
Volkmar
On Sun, 26 Aug 2007, Jay Hegdé wrote:
Dear SPMers:
I have a design with several dozen regressors (each modelled with the
hrf
and its two derivatives). I'd like to test the effect of each regressor
individually using a t contrast.
Since entering these contrasts individually by hand is a pain (not to
mention error-prone), I was wondering if there's a way of speeding up
this
process.
For instance, is it possible to import all the contrasts together
(i.e.,
in one shot) from a file? (I know one can import the contrasts one by
one
from a loaded cell, but I'm wondering if I can import all of them at
once.)
Thank you very much,
Jay
--
Volkmar Glauche
-
Department of Neurology [log in to unmask]
Universitaetsklinikum Freiburg Phone 49(0)761-270-5331
Breisacher Str. 64 Fax 49(0)761-270-5416
79106 Freiburg http://fbi.uniklinik-freiburg.de/
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--
Volkmar Glauche
-
Department of Neurology [log in to unmask]
Universitaetsklinikum Freiburg Phone 49(0)761-270-5331
Breisacher Str. 64 Fax 49(0)761-270-5416
79106 Freiburg http://fbi.uniklinik-freiburg.de/
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
|