help > Concatenation error in conn_batch
8 hours ago | James Waltz
Concatenation error in conn_batch

Hi-


I have a batch script “matlab_5subjs.m” (attached), and it gets pretty far before it crashes.


I only have 2 ROIs/set of ROIs.


I only have 2 resting runs per subject: runs = {'AP_run-1','PA_run-2'};


So, I only have 2 motion files and 2 censor files, which I name:


    m{1} = [funcdir, '/', subj, '_', ses,  '_task-rest_dir-AP_run-1_motion-24vectors.1D']


    m{2} = [funcdir, '/', subj,'_',ses,'_task-rest_dir-PA_run-2_motion-24vectors.1D']


    c{1} = [funcdir, '/', subj,'_',ses,'_task-rest_dir-AP_run-1_censor.1D']


    c{2} = [funcdir, '/', subj,'_',ses,'_task-rest_dir-PA_run-2_censor.1D']


 


The script breaks down on Line 239, when “conn_batch(batch);” is called. The data structure “batch” must be messed-up. The error I get is:


 


Error using cat


Dimensions of matrices being concatenated are not consistent.


 


Error in conn_loadtextfile (line 51)


    else tnames={}; tdata=cat(1,vdata{:});


 


Error in conn_process (line 541)


                                data{nl1covariate}=conn_loadtextfile(filename,false);


 


Error in conn_process (line 68)


            case {'preprocessing','denoising'},   conn_disp(['CONN: RUNNING DENOISING STEP']);


            conn_process([1.5,2,5:9],varargin{:});


 


Error in conn_batch (line 1418)


            conn_process Denoising;


 


So, the dimensions of matrices being concatenated are not consistent. I think that must be the covariate files, which are specified on Lines 209 and 210:


 


    files_cov{i}{1}{1} = { m{1} };  files_cov{i}{2}{1} = { c{1} };


    files_cov{i}{3}{2} = { m{2} };  files_cov{i}{4}{2} = { c{2} };


 


“files_cov” is a 3 dimensional array of cells (5 x 4 x 4). I can’t quite tell what conn_batch is trying to concatenate. Maybe those arrays have the wrong dimensions.


Any help would be appreciated.


Thanks,


jw

Attachment: matlab_5subjs.m