help > Error "Index exceeds the number of array elements. Index must not exceed 2." in preprocessing step
Sep 21, 2026  11:09 AM | Hyunjun Park
Error "Index exceeds the number of array elements. Index must not exceed 2." in preprocessing step

Dear users,


I'm preprocessing my fMRI datasets using CONN connectivity.
My datasets consist of two sessions and two different conditions were assigned to each session.
I designed the script for it. While uploading images and setting up conditions were okay, I got the error message below during the preprocessing. Would you mind letting me know how I can fix this error, or sharing any previous posts regarding it, please?


---------------------------- [ Error Message ] ----------------------------
Step 7/7: Updating Denoising variables
Index exceeds the number of array elements. Index must not exceed 2.


Error in conn_process (line 1226)
for n1=1:N2, CONN_x.Preproc.variables.dimensions{N1+n1}=max(CONN_x.Preproc.variables.dimensions{N1+n1},size(x2.data{n1},2)*ones(1,2)); end
^^^^^^^^^^^
Error in conn_process (line 55)
case 'setup', conn_disp(['CONN: RUNNING SETUP STEP']); conn_process([0:4,4.5,5]);
^^^^^^^^^^^^^^^^^^^^^^^^^
Error in conn_batch (line 1361)
conn_process Setup;
^^^^^^^^^^^^
Error in GBA_prepro_Batch_v1 (line 29)
conn_batch('filename', projectFile, ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


------------------------------------------------------------------------


  Edited (Sep 22, 2026  11:09 AM)

Threaded View

TitleAuthorDate
Error "Index exceeds the number of array elements. Index must not exceed 2." in preprocessing step
Hyunjun Park Sep 21, 2026
Alfonso Nieto-Castanon Oct 10, 2026