SPM12--batch批量预处理数据
实现的代码如下: code.m % By - Galory Email - 996377370a@gmail.com % List of open inputs global sub type % My files are named as 1 2 3 4 5 6 7 8 9 10 type ={ '1' '2' '3' '4' '5' '6' '7' '8' '9' '10' }; for i=1:length( type ) sub = i; nrun = 1; % enter the number of runs here jobfile = { 'C:\Users\xuwhe\Desktop\pre_fmri\files\batch\code_job.m' }; jobs = repmat(jobfile, 1, nrun); inputs = cell(0, nrun); for crun = 1:nrun end spm( 'defaults' , 'fmri' ); spm_jobman( 'run' , jobs ,inputs{:}); end code_job.m %----------------------------------------------------------------------- % Job saved on 31-Jul-2018 16:26:14 by cfg_util (rev $Rev : 6460 $) % spm SPM - SPM12 (6906) % cfg_basicio BasicIO - Unknown %----------------------------------------------------------------------- global type sub inputpath=[ 'C:\Users\xuwhe\Desktop\pre_fmri\data_batch\1dicom\...