help > RE: conditions: matrix exceeds dimensions-problem
Jul 25, 2012  07:07 AM | Alfonso Nieto-Castanon - Boston University
RE: conditions: matrix exceeds dimensions-problem
Hi Niels,

I believe this error might be related to having some conditions that are not defined in all sessions. While the conn toolbox should handle that scenario without a problem it seems the 'import-from-SPM' scripts have a problem with these cases. If that is the case for your data, could you please try the attached patch (simply copy this file in the conn folder, overwriting the file with the same name there), then re-run the 'import' step, and let me know whether this seems to fix this issue?

Cheers
Alfonso

Originally posted by Niels Foit:
Hi Alonso

Thank you for your fast reply. So I was trying to import 18 subjects' SPM files via the GUI, works fine. All subjects had two sessions in one SPM-file, with the conditions a+b or a+c.
As soon as I start preprocessing, the following error appears:

??? Index exceeds matrix dimensions.
Error in ==> conn_process at 78
                        okconditions(ncondition)=okconditions(ncondition)|(~isempty(CONN_x.Setup.conditions.values{nsub}{ncondition}{nses}{1})&&~isempty(CONN_x.Setup.conditions.values{nsub}{nconditio
                        Error in ==> conn_process at 10
        case 'setup',           disp(['CONN: RUNNING SETUP STEP']); conn_process([0:5]);

Error in ==> conn at 1057
   conn_process('setup');

Error in ==> conn_menumanager at 116
       feval(MM.MENU{n0}.callback{n1}{1},MM.MENU{n0}.callback{n1}{2:end});
 
??? Error while evaluating figure WindowButtonUpFcn


I narrowed the problem down by excluding single subjects, this revealed that subjects with the conditions A+C caused the program to produce this error.
There is no reason I could think of why this is happening. Any help is appreciated!

Cheers

NIelsOriginally posted by Alfonso Nieto-Castanon:
Hi Niels,

Sorry I am not exactly sure if I am understanding your question correctly. The scripts that import the information from SPM.mat files into the conn toolbox do not have a limit in the number of specified conditions. Perhaps the issue arises because your original SPM model is defined separately for each session (e.g. one single-session SPM model per subject and per session) instead of modeling multiple sessions directly (e.g. one multi-session SPM model per subject)? the toolbox scripts expect the latter (one SPM.mat file per subject). In any way, if you could give me a little more information on your error condition (e.g. are you entering this through batch scripts or with the GUI, how are multiple session modeled in your original SPM.mat files, what is exactly the error message that you get in the matlab command line) I will be happy to help you find out what might be going on.

Best
Alfonso



Originally posted by Niels Foit:
hello conn-experts
 
first of all: great tool. have been using it for single-subject analyses mainly but I would like to switch to group-level now.
I ran into a problem with the conditions in my spm-files: apparently, there is a limit to the number of conditions, which I was not aware of. my paradigm consists of three slightly different sessions. If I load them all, conn aborts with the above-named error. Any suggestions? I could of course run each session as a single "group" but this is not exactly helpful for my research.
 
cheers
niels
Attachment: conn_importspm.m

Threaded View

TitleAuthorDate
Niels Foit Jul 24, 2012
Alfonso Nieto-Castanon Jul 25, 2012
Niels Foit Jul 25, 2012
RE: conditions: matrix exceeds dimensions-problem
Alfonso Nieto-Castanon Jul 25, 2012
Niels Foit Jul 26, 2012
Alfonso Nieto-Castanon Jul 27, 2012
Niels Foit Jul 28, 2012
Alfonso Nieto-Castanon Jul 30, 2012