Dear Richard,
> There is a problem with the parametric evaluation in the batch mode of
> SPM 99.
>
> I made a SPM-batch program to calculate a linear parametric model,
> but at some point the batch program stops working and displays the
> message 'SWITCH expression must result in a scalar or string constant'
>
> This happens when the batch program reaches line 338 (this
> line contains switch Etype) in the program spm_get_ons.m
>
>
>
> When I examine the SPM batch matlab program, where the error is made,
> I see near that line that there are two cases for that switch command.
> There exists a case 'exponen' and a case 'polynom' but no case that is
> called 'linear'. I think there should be one, because that's one of
> the selections that can be made with the batch.
The reason, why there is no linear case, is because line 338 in
spm_get_ons defines parameters for the parametric modulations. This is
not necessary for the linear modulation.
The error message 'SWITCH expression must result in a scalar or string
constant' tries to tell you that the input to the switch command is not
a scalar or string constant, but something else, i.e. matlab does not
even look at the content of the argument, but just states an error
because the data type is not valid for the switch command.
My best guess is that there is a mismatch between your specification of
the parametric option and the expected data type. In case that you used
one curly bracket for your specification of the linear option, could you
try instead:
'exp_type', {{'linear'}}
Hope this helps, Stefan
--
Stefan Kiebel
Functional Imaging Laboratory
Wellcome Dept. of Cognitive Neurology
12 Queen Square
WC1N 3BG London, UK
Tel.: +44-(0)20-7833-7478
FAX : -7813-1420
email: [log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|