Hi @Mia DeCataldo ,
Your " Array indices must be positive integers" error at cat_run.m line 526 is a known CAT12 parallel processing conflict that occurs when batch processing multiple subjects simultaneously with your current workflow (loading template via cat12_segmentation_template_move.m then injecting current_files into matlabbatch) - the error happens in CAT12's logging subsystem (which is why MATLAB doesn't show "*Busy*” but jobs continue running and results still generate), not in the core segmentation engine, so your outputs remain valid despite the error message (ref: https://www.mathworks.com/help/spm/ ). The quickest fix is to disable parallel processing by adding spm_get_defaults('cmdline', true); maxNumCompThreads(1); before your spm_jobman('run', matlabbatch);line, or alternatively process subjects sequentially in a loop with individual batches to eliminate the indexing conflicts entirely while maintaining full verbose output and proper "Done" messaging (ref: https://www.mathworks.com/help/parallel-computing/ ). Additionally, replace your string concatenations with fullfile()for the TPM and shooting template paths to ensure cross-platform compatibility (ref: https://www.mathworks.com/help/matlab/ref/fullfile.html ). This is a documented limitation in CAT12's interface with SPM12's batch system on Linux (ref: https://neuro-jena.github.io/cat12/ ), and either solution will resolve the error while preserving all functionality.