Dear Laura,
It seems that the onset of the only trial for the last condition of the
first session is stored as an int32 instead of a double:
>> load G16095-1_FID_1_StimInfo.mat
>> onsets{8}
ans =
331
>> whos ans
Name Size Bytes Class Attributes
ans 1x1 4 int32
If you convert it to double and save it in the mat file again, it should
work fine:
>> onsets{8} = double(onsets{8});
>> save G16095-1_FID_1_StimInfo.mat
Best regards,
Guillaume.
On 03/08/18 21:51, Laura Holsen wrote:
> Hello expert SPMers, I have been attempting to use a multiple conditions
> .mat files to enter numerous onset and duration times into the model
> specification (prior to this, I had entered by hand into the Batch
> Editor). This is a paradigm with 3 runs (thus three .mat files). Despite
> troubleshooting for a few days, tweaking the files, entering via the
> Batch Editor or a matlab .m script, I keep coming up against the
> following error in matlab: ---- Failed 'fMRI model specification' Error
> using - Integers can only be combined with integers of the same class,
> or scalar doubles. In file
> "/autofs/space/fasciculus_001/users/spm12/spm_get_ons.m" (v4855),
> function "spm_get_ons" at line 87. In file
> "/autofs/space/fasciculus_001/users/spm12/spm_fMRI_design.m" (v5183),
> function "spm_fMRI_design" at line 221. In file
> "/autofs/space/fasciculus_001/users/spm12/spm_fmri_spm_ui.m" (v6088),
> function "spm_fmri_spm_ui" at line 183. In file
> "/autofs/space/fasciculus_001/users/spm12/config/spm_run_fmri_spec.m"
> (v6562), function "spm_run_fmri_spec" at line 386. ---- It appears to be
> an issue with the vectors or matricies during calculation of
> peri-stimulus times for each condition. I have checked and rechecked
> that all of the conditions have the same number of onsets and durations,
> etc., but am unable to get beyond this error. I have attached the .mat
> files if these are at all helpful. I would be most grateful if someone
> could help me resolve this error. Happy to provide additional details if
> needed. Many thanks, Laura Holsen
--
Guillaume Flandin, PhD
Wellcome Centre for Human Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|