help > Error in Scripting to Bulk Import Scans
Mar 5, 2025  06:03 PM | Amy Wang
Error in Scripting to Bulk Import Scans

Hello, 


We are new to CONN and would love some help trying to set up preprocessing for resting state analysis. We are working with 104 participants, each with varying 1-3 sessions (totaling to 222 sessions), so we wanted to script for bulk importing scans to CONN. However, we have been stuck on the file loading step. We are using the code adapted from the conn_batch_workshop_nyudataset.m to load structural and functional files, but have been getting the error "mismatch number of functional files". 


We have tried a few things ourselves trying to figure out the error: making sure that structural and resting files are consistent/matching for participants/sessions, checking that there's no duplicates or missing files, looking for typos, unzipping the files before running the code, etc. However, we are still getting the same error message. One thing we have noticed is that when we change "nsubjects" to 222 (total number of sessions), the code runs, but it no longer recognizes the different sessions for each subject. Under "Workspace", we do see that under Functional_File and Structural_File, the correct file path is listed, with the matching subject/session. We can't seem to figure out why or what the mismatch is referring to? I have attached a screenshot of our MATLAB workspace here. We would appreciate any help or suggestions to try next.


Thank you!

Threaded View

TitleAuthorDate
Error in Scripting to Bulk Import Scans
Amy Wang Mar 5, 2025
Alfonso Nieto-Castanon Mar 6, 2025