From 82d2acd169f2afa562b4541ed4738b544b2876fc Mon Sep 17 00:00:00 2001 From: Cyril Pernet Date: Wed, 30 Oct 2024 07:23:25 +0100 Subject: [PATCH] adjust model to the number of unique slice time (= adjust to MB) --- bids/spmup_BIDS_1rstlevel.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bids/spmup_BIDS_1rstlevel.m b/bids/spmup_BIDS_1rstlevel.m index bdfeb41..97a14c5 100644 --- a/bids/spmup_BIDS_1rstlevel.m +++ b/bids/spmup_BIDS_1rstlevel.m @@ -148,7 +148,7 @@ delete(fullfile(check_mat.folder,check_mat.name)) end end - N = length(subject.func_metadata{1}.SliceTiming); + N = length(unique(subject.func_metadata{1}.SliceTiming)); matlabbatch{1}.spm.stats.fmri_spec.dir = {Statspath}; matlabbatch{1}.spm.stats.fmri_spec.timing.units = 'secs'; matlabbatch{1}.spm.stats.fmri_spec.timing.RT = subject.func_metadata{1}.RepetitionTime;