Dear Alexa, Volkmar,
As I was just confronted with the same problem I would like to contribute an
even easier solution to the problem. Indeed in SPM2 the effects of interest
F contrast was generated inside spm_spm.m. This is not the case in SPM5.
Therefore trying to establish new contrasts with
SPM.xCon(end + 1) = ...
fails. The simple solution might be to change the indexing in the first
contrast to
SPM.xCon(1) = ...
or omit it altogether
SPM.xCon = ...
Alternatively, if one wants to create the effects of interest F contrast in
an old fashioned (spm2 style) batch the following works nicely as the first
contrast (it's taken from SPM2's spm_spm.m):
cname = 'effects of interest';
try
iX0 = [SPM.xX.iB SPM.xX.iG];
catch
iX0 = [];
end
SPM.xCon = spm_FcUtil('Set',cname,'F','iX0',iX0,SPM.xX.xKXs);
-Christian Büchel
--
Prof. Dr. Christian Büchel
Institut für Systemische Neurowissenschaften
Haus S10, Universitätsklinikum Hamburg-Eppendorf, Martinistr. 52, D-20246
Hamburg, Germany
Tel.: +49-40-42803-4726
Fax.: +49-40-42803-9955
[log in to unmask]
http://www.uke.uni-hamburg.de/institute/systemische-neurowissenschaften/
> -----Ursprüngliche Nachricht-----
> Von: SPM (Statistical Parametric Mapping)
> [mailto:[log in to unmask]] Im Auftrag von Alexa Morcom
> Gesendet: Mittwoch, 5. September 2007 10:24
> An: [log in to unmask]
> Betreff: Re: [SPM] Is it possible to enter t contrasts collectively?
>
> 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.
>
--
Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG):
Universitätsklinikum Hamburg-Eppendorf
Körperschaft des öffentlichen Rechts
Gerichtsstand: Hamburg
Vorstandsmitglieder:
Prof. Dr. Jörg F. Debatin (Vorsitzender)
Dr. Alexander Kirstein
Ricarda Klein
Prof. Dr. Dr. Uwe Koch-Gromus
|