Error with GLM_Flex_FAST4

55 views
Skip to first unread message

Mathieu Lesourd

unread,
Jul 9, 2019, 4:45:31 PM7/9/19
to Aaron's fMRI matlab tools.
Dear all,

I am new with GLM Flex and today I met my first error (see below).

Is anyone could help me to find the source of this error?

Thank you very much.

-------------------------------------------------------------
Setup/Check the I Structure:

Reading In Data:

Perform Specified Transformations:

Intialize Variable and Output Structures

Examining Set #4: SubModel 33 of 33; Nvox = 23



Analysing Sub-Model #1 of 24617; 192 Observations, across 88196 Voxels.
Spatial non-sphericity (over scans)     :                        ...done

Analysing Sub-Model #1 of 24617; 192 Observations, across 88196 Voxels.
Spatial non-sphericity (over scans)     :                        ...done

Analysing Sub-Model #1 of 24617; 192 Observations, across 88196 Voxels.
Spatial non-sphericity (over scans)     :                        ...done

Analysing Sub-Model #1 of 24617; 192 Observations, across 88196 Voxels.
Spatial non-sphericity (over scans)     :                        ...done

Analysing Sub-Model #2 of 24617; 188 Observations, across 9 Voxels.Error using  * 
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second
matrix. To perform elementwise multiplication, use '.*'.

Error in GLM_Flex_Fast4 (line 680)
            Y = I.W{ii}*OD(Xind,vec);

Error in ACTOBS_GLMflex_fast4 (line 139)
I = GLM_Flex_Fast4(I);

Aaron Schultz

unread,
Jul 9, 2019, 11:08:27 PM7/9/19
to fmri_mat...@googlegroups.com
Put in a try/catch statement around line 680, and then inspect the
size of the matrices when it catches and report that back.

-Aaron
> --
> You received this message because you are subscribed to the Google Groups "Aaron's fMRI matlab tools." group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fmri_matlab_to...@googlegroups.com.
> To post to this group, send email to fmri_mat...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fmri_matlab_tools/b9a9d479-7a8e-42ca-b71b-cf46a58b88c2%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Mathieu Lesourd

unread,
Jul 10, 2019, 10:21:12 AM7/10/19
to Aaron's fMRI matlab tools.
Hi Aaron,
thanks for your message.

I put this try/catch block around line 680:

try
            %%%%%%%% Var/Covar correct %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            Y = I.W{ii}*OD(Xind,vec);
            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            
            catch
                msg = ['size of W: ', num2str(size(I.W{ii})), ' size of OD', num2str(size(OD))];
                error(msg)
            
            end

Then, it gave that back to me:


>> script_ACTOBS_GLMflex_fast4

Setup/Check the I Structure:

Reading In Data:

Perform Specified Transformations:

Intialize Variable and Output Structures

Examining Set #4: SubModel 33 of 33; Nvox = 23

Analysing Sub-Model #2 of 24617; 188 Observations, across 9 Voxels.Error using GLM_Flex_Fast4 (line 687)
size of W: 192  192 size of OD192  144148

Error in script_ACTOBS_GLMflex_fast4 (line 139)
I = GLM_Flex_Fast4(I);

I have to admit that I do not know what is W and OD and I am pretty sure that you will explain why I get this error.

Thanks a lot for your time!

Mathieu
> To unsubscribe from this group and stop receiving emails from it, send an email to fmri_mat...@googlegroups.com.

Mathieu Lesourd

unread,
Jul 16, 2019, 9:36:18 AM7/16/19
to fmri_mat...@googlegroups.com
Dear Aaron,

I imagine you are very busy but I am still stuck with this error..

Do you have an idea to fix it?

Thank you very much,

Mathieu

To unsubscribe from this group and stop receiving emails from it, send an email to fmri_matlab_to...@googlegroups.com.

To post to this group, send email to fmri_mat...@googlegroups.com.

Aaron Schultz

unread,
Jul 16, 2019, 12:42:47 PM7/16/19
to fmri_mat...@googlegroups.com
I'm not quite sure what is going on, and it is difficult to determine
remotely. Based on the output I.W and OD should have 188 rows not
192, but if both are 192 to the matrix algebra should still work just
fine. Are the sizes you posted for size(I.W{ii}) and
size(OD(Xind,vec))?

If you set I.DoOnlyAll=1, does it everything run ok?

You can also try putting a continue command in the catch statement.
It would be good to know if this error is happening on every iteration
or just specific iterations.

-Aaron

On Tue, Jul 16, 2019 at 9:36 AM Mathieu Lesourd
> To view this discussion on the web visit https://groups.google.com/d/msgid/fmri_matlab_tools/62CD8AF1-2339-4C97-A5C2-EF2EACDBBE86%40gmail.com.
Reply all
Reply to author
Forward
0 new messages