Brace indexing is not supported for variables of this type.
Dear Matlab communities:
I am running a spm script for analyizing neuroimaging data, the first script here (ModelSpecificationBinaryMask.m) is to loop another job file ModelSpecificationBinaryMask_job.m over the two subjects while assigning the regressor files that correspond to each of the runs for one subject.
However, I am seeing the follwing errors:
Brace indexing is not supported for variables of this type.
Error in spm_jobman>canonicalise_jobs (line 415)
comp(i) = comp(i) && any(strcmp(fieldnames(job{i}{j}), …
Error in spm_jobman (line 152)
mljob = canonicalise_jobs(jobs);
Error in ModelSpecificationBinaryMask (line 50)
spm_jobman(‘run’, jobs, inputs);
ModelSpecificationBinaryMask.m
clear
close all
clc
% Created by GB on 9/9/19.
% Edited by LC on 8/19/24.
for sub = [101,102]
jobfile = {‘/Volumes/PUMPKIN/scripts/GabbyScripts/ModelSpecificationBinaryMaskTHRESHOFF_job.m’};
nrun = 1; % Assuming nrun should be 1 since we are processing one subject at a time
ncue = 8; % 8 runs for cue task
jobs = repmat(jobfile, 1, nrun);
inputs = cell(25, 1); % Initialize cell array for inputs (25 because you have 3 inputs per run and 8 runs)
% Create a homepath, a base location of all the data
homepath = ‘/Volumes/PUMPKIN/Preprocessed/groupA/Volumes’;
evpath = ‘/Volumes/PUMPKIN/Regressors’;
for n = 1:nrun
sub_path = fullfile(‘/Volumes/PUMPKIN/halfpipeXspm/sub-‘, num2str(sub(n)), ‘/1stLevel’);
%mkdir(sub_path);
inputs{1, n} = {sub_path}; % fMRI model specification: Directory – cfg_files
% Loop through each run for the subject
for run = 1:ncue
run_dir = fullfile(homepath, strcat(‘sub_’, num2str(sub(n))), ‘-‘, num2str(run));
% List all ‘vol_*.nii’ files in the current folder
files = dir(fullfile(run_dir, ‘vol_*.nii’));
if ~isempty(files)
% Now assign images
inputs{2+(run-1)*3, n} = {fullfile(run_dir, {files.name})}; % fMRI model specification: Scans – cfg_files
% Insert multiple condition files (i.e., evs)
ev_file = dir(fullfile(evpath, strcat(‘sub’, num2str(sub(n)), ‘run’, num2str(run), ‘_exev_CS_faceCue.mat’)));
inputs{3+(run-1)*3, n} = {fullfile(evpath, ev_file.name)};
% Insert multiple regressors (6 rigid body motion parameters)
rp_file = dir(fullfile(run_dir, ‘rp_af*.txt’));
inputs{4+(run-1)*3, n} = {fullfile(run_dir, rp_file.name)};
end
clear files rp_file
end
clear currfold
end
% Run the job using SPM
spm_jobman(‘run’, jobs, inputs);
end
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% ModelSpecificationBinaryMask_job.m
%———————————————————————–
% Job saved on 17-Jun-2016 14:21:03 by cfg_util (rev $Rev: 6134 $)
% spm SPM – SPM12 (6225)
% cfg_basicio BasicIO – Unknown
%———————————————————————–
disp(‘Script is running’);
matlabbatch(1).spm.stats.fmri_spec.dir = {‘/Volumes/PUMPKIN/halfpipeXspm/sub-*/1stLevel’};
matlabbatch(1).spm.stats.fmri_spec.timing.units = ‘secs’;
matlabbatch(1).spm.stats.fmri_spec.timing.RT = 2;
matlabbatch(1).spm.stats.fmri_spec.timing.fmri_t = 32;
matlabbatch(1).spm.stats.fmri_spec.timing.fmri_t0 = 1;
matlabbatch(1).spm.stats.fmri_spec.sess(1).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(1).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(1).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(1).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(1).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(1).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(2).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(2).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(2).multi ='<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(2).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(2).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(2).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(3).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(3).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(3).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(3).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(3).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(3).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(4).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(4).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(4).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(4).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(4).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(4).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(5).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(5).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(5).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(5).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(5).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(5).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(6).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(6).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(6).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(6).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(6).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(6).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(7).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(7).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(7).multi ='<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(7).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(7).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(7).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(8).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(8).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(8).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(8).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(8).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(8).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.fact = struct(‘name’, {}, ‘levels’, {});
matlabbatch(1).spm.stats.fmri_spec.bases.hrf.derivs = [0 0];
matlabbatch(1).spm.stats.fmri_spec.volt = 1;
matlabbatch(1).spm.stats.fmri_spec.global = ‘None’;
matlabbatch(1).spm.stats.fmri_spec.mthresh = 0.0; %no voxels are thresholded so all voxels are being used%
matlabbatch(1).spm.stats.fmri_spec.mask = {‘/Volumes/PUMPKIN/scripts/LancyScripts/peripheral/C1-101-117/binarygreymattermask.nii’};
matlabbatch(1).spm.stats.fmri_spec.cvi = ‘AR(1)’;
disp(‘Script completed’);Dear Matlab communities:
I am running a spm script for analyizing neuroimaging data, the first script here (ModelSpecificationBinaryMask.m) is to loop another job file ModelSpecificationBinaryMask_job.m over the two subjects while assigning the regressor files that correspond to each of the runs for one subject.
However, I am seeing the follwing errors:
Brace indexing is not supported for variables of this type.
Error in spm_jobman>canonicalise_jobs (line 415)
comp(i) = comp(i) && any(strcmp(fieldnames(job{i}{j}), …
Error in spm_jobman (line 152)
mljob = canonicalise_jobs(jobs);
Error in ModelSpecificationBinaryMask (line 50)
spm_jobman(‘run’, jobs, inputs);
ModelSpecificationBinaryMask.m
clear
close all
clc
% Created by GB on 9/9/19.
% Edited by LC on 8/19/24.
for sub = [101,102]
jobfile = {‘/Volumes/PUMPKIN/scripts/GabbyScripts/ModelSpecificationBinaryMaskTHRESHOFF_job.m’};
nrun = 1; % Assuming nrun should be 1 since we are processing one subject at a time
ncue = 8; % 8 runs for cue task
jobs = repmat(jobfile, 1, nrun);
inputs = cell(25, 1); % Initialize cell array for inputs (25 because you have 3 inputs per run and 8 runs)
% Create a homepath, a base location of all the data
homepath = ‘/Volumes/PUMPKIN/Preprocessed/groupA/Volumes’;
evpath = ‘/Volumes/PUMPKIN/Regressors’;
for n = 1:nrun
sub_path = fullfile(‘/Volumes/PUMPKIN/halfpipeXspm/sub-‘, num2str(sub(n)), ‘/1stLevel’);
%mkdir(sub_path);
inputs{1, n} = {sub_path}; % fMRI model specification: Directory – cfg_files
% Loop through each run for the subject
for run = 1:ncue
run_dir = fullfile(homepath, strcat(‘sub_’, num2str(sub(n))), ‘-‘, num2str(run));
% List all ‘vol_*.nii’ files in the current folder
files = dir(fullfile(run_dir, ‘vol_*.nii’));
if ~isempty(files)
% Now assign images
inputs{2+(run-1)*3, n} = {fullfile(run_dir, {files.name})}; % fMRI model specification: Scans – cfg_files
% Insert multiple condition files (i.e., evs)
ev_file = dir(fullfile(evpath, strcat(‘sub’, num2str(sub(n)), ‘run’, num2str(run), ‘_exev_CS_faceCue.mat’)));
inputs{3+(run-1)*3, n} = {fullfile(evpath, ev_file.name)};
% Insert multiple regressors (6 rigid body motion parameters)
rp_file = dir(fullfile(run_dir, ‘rp_af*.txt’));
inputs{4+(run-1)*3, n} = {fullfile(run_dir, rp_file.name)};
end
clear files rp_file
end
clear currfold
end
% Run the job using SPM
spm_jobman(‘run’, jobs, inputs);
end
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% ModelSpecificationBinaryMask_job.m
%———————————————————————–
% Job saved on 17-Jun-2016 14:21:03 by cfg_util (rev $Rev: 6134 $)
% spm SPM – SPM12 (6225)
% cfg_basicio BasicIO – Unknown
%———————————————————————–
disp(‘Script is running’);
matlabbatch(1).spm.stats.fmri_spec.dir = {‘/Volumes/PUMPKIN/halfpipeXspm/sub-*/1stLevel’};
matlabbatch(1).spm.stats.fmri_spec.timing.units = ‘secs’;
matlabbatch(1).spm.stats.fmri_spec.timing.RT = 2;
matlabbatch(1).spm.stats.fmri_spec.timing.fmri_t = 32;
matlabbatch(1).spm.stats.fmri_spec.timing.fmri_t0 = 1;
matlabbatch(1).spm.stats.fmri_spec.sess(1).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(1).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(1).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(1).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(1).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(1).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(2).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(2).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(2).multi ='<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(2).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(2).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(2).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(3).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(3).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(3).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(3).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(3).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(3).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(4).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(4).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(4).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(4).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(4).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(4).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(5).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(5).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(5).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(5).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(5).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(5).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(6).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(6).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(6).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(6).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(6).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(6).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(7).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(7).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(7).multi ='<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(7).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(7).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(7).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(8).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(8).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(8).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(8).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(8).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(8).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.fact = struct(‘name’, {}, ‘levels’, {});
matlabbatch(1).spm.stats.fmri_spec.bases.hrf.derivs = [0 0];
matlabbatch(1).spm.stats.fmri_spec.volt = 1;
matlabbatch(1).spm.stats.fmri_spec.global = ‘None’;
matlabbatch(1).spm.stats.fmri_spec.mthresh = 0.0; %no voxels are thresholded so all voxels are being used%
matlabbatch(1).spm.stats.fmri_spec.mask = {‘/Volumes/PUMPKIN/scripts/LancyScripts/peripheral/C1-101-117/binarygreymattermask.nii’};
matlabbatch(1).spm.stats.fmri_spec.cvi = ‘AR(1)’;
disp(‘Script completed’); Dear Matlab communities:
I am running a spm script for analyizing neuroimaging data, the first script here (ModelSpecificationBinaryMask.m) is to loop another job file ModelSpecificationBinaryMask_job.m over the two subjects while assigning the regressor files that correspond to each of the runs for one subject.
However, I am seeing the follwing errors:
Brace indexing is not supported for variables of this type.
Error in spm_jobman>canonicalise_jobs (line 415)
comp(i) = comp(i) && any(strcmp(fieldnames(job{i}{j}), …
Error in spm_jobman (line 152)
mljob = canonicalise_jobs(jobs);
Error in ModelSpecificationBinaryMask (line 50)
spm_jobman(‘run’, jobs, inputs);
ModelSpecificationBinaryMask.m
clear
close all
clc
% Created by GB on 9/9/19.
% Edited by LC on 8/19/24.
for sub = [101,102]
jobfile = {‘/Volumes/PUMPKIN/scripts/GabbyScripts/ModelSpecificationBinaryMaskTHRESHOFF_job.m’};
nrun = 1; % Assuming nrun should be 1 since we are processing one subject at a time
ncue = 8; % 8 runs for cue task
jobs = repmat(jobfile, 1, nrun);
inputs = cell(25, 1); % Initialize cell array for inputs (25 because you have 3 inputs per run and 8 runs)
% Create a homepath, a base location of all the data
homepath = ‘/Volumes/PUMPKIN/Preprocessed/groupA/Volumes’;
evpath = ‘/Volumes/PUMPKIN/Regressors’;
for n = 1:nrun
sub_path = fullfile(‘/Volumes/PUMPKIN/halfpipeXspm/sub-‘, num2str(sub(n)), ‘/1stLevel’);
%mkdir(sub_path);
inputs{1, n} = {sub_path}; % fMRI model specification: Directory – cfg_files
% Loop through each run for the subject
for run = 1:ncue
run_dir = fullfile(homepath, strcat(‘sub_’, num2str(sub(n))), ‘-‘, num2str(run));
% List all ‘vol_*.nii’ files in the current folder
files = dir(fullfile(run_dir, ‘vol_*.nii’));
if ~isempty(files)
% Now assign images
inputs{2+(run-1)*3, n} = {fullfile(run_dir, {files.name})}; % fMRI model specification: Scans – cfg_files
% Insert multiple condition files (i.e., evs)
ev_file = dir(fullfile(evpath, strcat(‘sub’, num2str(sub(n)), ‘run’, num2str(run), ‘_exev_CS_faceCue.mat’)));
inputs{3+(run-1)*3, n} = {fullfile(evpath, ev_file.name)};
% Insert multiple regressors (6 rigid body motion parameters)
rp_file = dir(fullfile(run_dir, ‘rp_af*.txt’));
inputs{4+(run-1)*3, n} = {fullfile(run_dir, rp_file.name)};
end
clear files rp_file
end
clear currfold
end
% Run the job using SPM
spm_jobman(‘run’, jobs, inputs);
end
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% ModelSpecificationBinaryMask_job.m
%———————————————————————–
% Job saved on 17-Jun-2016 14:21:03 by cfg_util (rev $Rev: 6134 $)
% spm SPM – SPM12 (6225)
% cfg_basicio BasicIO – Unknown
%———————————————————————–
disp(‘Script is running’);
matlabbatch(1).spm.stats.fmri_spec.dir = {‘/Volumes/PUMPKIN/halfpipeXspm/sub-*/1stLevel’};
matlabbatch(1).spm.stats.fmri_spec.timing.units = ‘secs’;
matlabbatch(1).spm.stats.fmri_spec.timing.RT = 2;
matlabbatch(1).spm.stats.fmri_spec.timing.fmri_t = 32;
matlabbatch(1).spm.stats.fmri_spec.timing.fmri_t0 = 1;
matlabbatch(1).spm.stats.fmri_spec.sess(1).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(1).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(1).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(1).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(1).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(1).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(2).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(2).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(2).multi ='<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(2).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(2).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(2).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(3).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(3).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(3).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(3).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(3).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(3).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(4).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(4).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(4).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(4).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(4).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(4).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(5).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(5).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(5).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(5).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(5).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(5).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(6).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(6).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(6).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(6).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(6).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(6).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(7).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(7).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(7).multi ='<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(7).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(7).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(7).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.sess(8).scans = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(8).cond = struct(‘name’, {}, ‘onset’, {}, ‘duration’, {}, ‘tmod’, {}, ‘pmod’, {}, ‘orth’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(8).multi = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(8).regress = struct(‘name’, {}, ‘val’, {});
matlabbatch(1).spm.stats.fmri_spec.sess(8).multi_reg = ‘<UNDEFINED>’;
matlabbatch(1).spm.stats.fmri_spec.sess(8).hpf = 128;
matlabbatch(1).spm.stats.fmri_spec.fact = struct(‘name’, {}, ‘levels’, {});
matlabbatch(1).spm.stats.fmri_spec.bases.hrf.derivs = [0 0];
matlabbatch(1).spm.stats.fmri_spec.volt = 1;
matlabbatch(1).spm.stats.fmri_spec.global = ‘None’;
matlabbatch(1).spm.stats.fmri_spec.mthresh = 0.0; %no voxels are thresholded so all voxels are being used%
matlabbatch(1).spm.stats.fmri_spec.mask = {‘/Volumes/PUMPKIN/scripts/LancyScripts/peripheral/C1-101-117/binarygreymattermask.nii’};
matlabbatch(1).spm.stats.fmri_spec.cvi = ‘AR(1)’;
disp(‘Script completed’); spm, image processing, error MATLAB Answers — New Questions