%Here, we reshape the cell into a format readable by spm. The input is
%put in a single 1x1 cell containing #volume x 1 cells.
preprocessed_nifti=preprocessed_nifti';
%preprocessed_nifti = {preprocessed_nifti} ;
fprintf('\n Preprocessed functional data found \n ')
%We will find for the "onsets_task_HILIGHT_ID" and the
%"REGRESSOR_nback_HILIGHT_ID_..." files created respectively with the
%"task_LM.m" codes and the "Merge_reg.m" code + creates output dir
output=char([paths.data'/'char(subs_info(id))'/MRI''/output_1stlevel_TASK-5LightConditions_RESTLight_LightOnOff']);%we save that path to create an output folder
matlabbatch{2}.spm.stats.fmri_est.spmmat(1)=cfg_dep('fMRI model specification: SPM.mat File',substruct('.','val','{}',{1},'.','val','{}',{1},'.','val','{}',{1}),substruct('.','spmmat'));