help > Error in dimensions of ROI matrix
Sep 25, 2026  11:09 AM | Francesc Xavier Aymerich
Error in dimensions of ROI matrix

Dear users,


 


At the end of SBC_01 analysis (step 3/3: Preparing second-level ROI analyses) I received the following error message:


ERROR DESCRIPTION:
 
Error using assert
input matrix must be square


Error in conn_mtx_write (line 21)
assert(M==size(data,2),'input matrix must be square'); 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in conn_process (line 4854)
 conn_mtx_write(outputfilename,Z,names,xyz,arrayfun(@(n)sprintf('Subject%03d',n),validsubjects,'uni',0));
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in conn_process (line 86)
 case 'analyses_gui_seedandroi',conn_disp(['CONN: RUNNING ANALYSIS STEP (ROI-to-ROI or seed-to-voxel analyses)']); conn_process([10,11,15],varargin{:});
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in conn (line 10376)
 conn_process('analyses_gui_seedandroi',CONN_x.Analysis); ispending=false;
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in conn_menumanager (line 125)
 feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end}); 
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
CONN25.b
SPM25 + DAiSS DEM FieldMap MEEGtools
Matlab v.2026a
project: CONN25.b
storage: 67.5Gb available


I have debugged this error and M and data have different dimensions but I don't know the reason.


Thanks in advance,


Xavier