I personally used a mat file (structure containing cell arryas as sepcified
by requireements). Actually the answer to our problems may be in the
previous message:
"I figured out the problem with loading parametric modulators as part of
the multicondition file in SPM5. I'm not sure why it happened, but probably
at some point Matlab changed the behavior of the switch function so it no
longer works well with cells.
To get this to work you need to make the following 2 changes to spm.
spm_config_fmri_spec.m
line 880: I have: P(q1).name = cond.pmod(q).name;
it should be: P(q1).name = cond.pmod(q).name{:};
spm_config_fmri_design.m
line 865: I have: P(q1).name = cond.pmod(q).name;
it should be: P(q1).name = cond.pmod(q).name{:};
It should work after you make these changes."
Rebecca"
I noticed that the code is un-ammended in the spm_config_fmri_spec.m file
in my case. Unfortunatelly I cannot change it: no admin rights... has
anybody tried to do it in spm? Did it work?
Iwo
On Aug 13 2010, Darren Gitelman wrote:
>Dear Rebecca and Iwo
>
>As far as I know the multicondition file must be a mat file and not a text
>file to define the mat file.
>
>I think what you need to do is to change the file name from 'multiple
>conditions run 1.txt' to 'multiple conditions run 1.m' and then run this
>file in Matlab. That will create the names onsets and durations cell arrays
>and save a file called 'partner1.mat' It is this file that you need to load
>as a multicondition.mat file.
>
>Darren
>
>On Fri, Aug 13, 2010 at 10:29 AM, Iwo Bohr <[log in to unmask]> wrote:
>
>> This is exactly the same problem as reported by me this morning. There
>> must be something in spm8 producing false errors, even though the actual
>> script spm_run_fmri_spec.m when run in isolation doesn't report any
>> errors. It's very strange indeed! So far nobody has come up with any
>> explanation to it...
>>
>> All the best,
>> Iwo
>>
>>
>> On Aug 13 2010, Rebecca Halchuk wrote:
>>
>> Hello,
>>>
>>> After having to reinstall MATLAB and SPM8, my multiple conditions files
>>> (for my first level design) that were previously working now fail.
>>>
>>> I get the following error when I try to run my batch:
>>>
>>> Error using ==> spm_run_fmri_spec at 126
>>> Cannot load C:\Couples study\Documentation\multiple conditions run1.txt
>>> In file "C:\Program Files\MATLAB
>>> scripts\spm8\config\spm_run_fmri_spec.m" (v3757), function
>>> "spm_run_fmri_spec" at line 126.
>>>
>>> Where line 126 refers to:
>>>
>>> error('Cannot load %s',sess.multi{1});
>>> end
>>> if ~(isfield(multicond,'names')&&isfield(multicond,'onsets')&&...
>>> isfield(multicond,'durations')) || ...
>>> ~all([numel(multicond.names),numel(multicond.onsets), ...
>>> numel(multicond.durations)]==numel(multicond.names))
>>> error(['Multiple conditions MAT-file ''%s'' is invalid.\n',...
>>> 'File must contain names, onsets, and durations '...
>>> 'cell arrays of equal length.\n'],sess.multi{1});
>>> end
>>>
>>>
>>> Does anyone have any advice on this matter? I have tried making .m
>>> files, but the batch won't recognize their presence (only text files).
>>> I have attached a text file for consideration.
>>>
>>> Thank you kindly,
>>>
>>> Rebecca
>>>
>>>
>>>
>> --
>>
>> Iwo
>>
>
>
>
>
--
Iwo
|