Dear Marko,
The variable 'R' has to be a numerical array instead of a cell array so,
in your script, you should call:
R = [R{:}];
before saving the *.mat file.
Best regards,
Guillaume.
On 08/06/2021 16:48, Marko Rajkovic wrote:
> Dear SPM experts
>
> I am currently preparing a second level analyses using a one-sample
> t-test on one contrast, with a sample of n=23 participants and 4
> nuisance variables (Age, Sex, handedness and schoolyears). The nuisance
> variables are stored in a .mat file with two (1,4) cell arrays with the
> variables "names" and "R". Each column of R contains 23 covariate
> values. After running the Script the following error occurred:
>
> ------------------------------------------------------------------------
> 08-Jun-2021 14:51:45 - Running job #1
> ------------------------------------------------------------------------
> 08-Jun-2021 14:51:45 - Running 'Factorial design specification'
> 08-Jun-2021 14:51:45 - Failed 'Factorial design specification'
> Undefined function 'mtimes' for input arguments of type 'cell'.
> In file "/Applications/MATLAB_ADD/spm12/spm_meanby.m" (v7675), function
> "spm_meanby" at line 43.
> In file
> "/Applications/MATLAB_ADD/spm12/config/spm_run_factorial_design.m"
> (v7739), function "spm_run_factorial_design" at line 623.
>
> The following modules did not run:
> Failed: Factorial design specification
>
> I searched for a possible solution online but I unfortunately have not
> been able to resolve the issue as of yet.
> I have attached the .m file and the resulting .mat file as reference.
>
> Any input or suggestions are greatly appreciated, as always.
>
> Kind Regards
> Marko
>
>
--
Guillaume Flandin, PhD
Wellcome Centre for Human Neuroimaging
UCL Queen Square Institute of Neurology
London WC1N 3BG
|