From 11fc70c521611aef894cf37cdc7471d57a335bac Mon Sep 17 00:00:00 2001 From: fishpm Date: Wed, 17 Jan 2024 14:23:35 +0100 Subject: [PATCH] fix minor bug minor fix to single if statement --- bids/spmup_BIDS_preprocess.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bids/spmup_BIDS_preprocess.m b/bids/spmup_BIDS_preprocess.m index 6e9ac7b..21cb1e1 100644 --- a/bids/spmup_BIDS_preprocess.m +++ b/bids/spmup_BIDS_preprocess.m @@ -606,7 +606,7 @@ strcmp(subject.fieldmap(ifmap).type, 'phasediff') && isempty(subject.fieldmap(ifmap).mag1) clear matlabbatch t1index = find(cellfun(@(x) contains(x,'T1w'),subject.anat)); - if length(t1index>1) + if length(t1index)>1 t1index = t1index(ifmap); % this should match session order as spm_BIDS end matlabbatch{1}.spm.spatial.coreg.write.ref = {subject.fieldmap(ifmap).phasediff};