Dear Daniel,
I'm not sure why you get this error. When I simply copy&paste the lines from your message into my matlab (augmenting your variables) and run spm_jobman('interactive', matlabbatch) afterwards, I don't get any initialisation errors and the values get propagated to the displayed job.
In many cases, it is more convenient not to modify the matlabbatch structures directly. The SPM manual describes a way how to design & save a batch template (or a series of templates) and a skript skeleton. In this skeleton you would put your subject/study specific data. The batch system will then take care of filling things into the right places of your batch template.
Best,
Volkmar
|