Hi Jiansong,
I think that maybe you do not have loaded your SPM defaults correctly.
If you type:
>>spm_defaults
then a defaults structure is created, but it does not contain all the
variables needed (at least, let's say that modality is not defined,
which is your problem).
One way to obtain all default values is just to load the GUI (just
typing spm fmri) and then begining the batch process. I like this one
very much, as you can see the graphical output whenever you want.
Another way to define all the default values is typing:
>>spm('defaults','fmri');
Then all variables needed for fMRI are loaded.
Hope this helps,
Juan J.
P.S.: the process should also work if you are working with PET, just do
change fmri by PET (e.g. spm pet) if your studies are PET studies.
Jiansong Xu wrote:
>Dear Friends:
>
>I am using batch code with spm2 and it runs fine. But after press the Result
>button and set the contrast, I got following error message.
>
>??? Reference to non-existent field 'modality'.
>
>Error in ==> /Applications/MATLAB6p5/spm2/spm_results_ui.m
>On line 509 ==> if strcmp(defaults.modality,'FMRI')
>
>Error in ==> /Applications/MATLAB6p5/spm2/spm_results_ui.m
>On line 436 ==> spm_results_ui('DrawButts',hReg,DIM,Finter,WS,FS);
>
>Error in ==> /Applications/MATLAB6p5/spm2/spm_results_ui.m
>On line 276 ==> hReg = spm_results_ui('SetupGUI',M,DIM,xSPM,Finter);
>
>??? Error while evaluating uicontrol Callback.
>
>
>Thanks
>
>Jiansong
>
>
--
________________________________________________________
Juan José Lull Noguera - jualulno_at_upvnet.upv.es
[MI - Medical Imaging Area]
BET - Bioengineering, Electronics and Telemedicine Group
UPV - Politechnical University of Valencia - Spain
________________________________________________________
|