diff --git a/src/pspm_dcm.m b/src/pspm_dcm.m index 7b0f4188b..66fd6869d 100644 --- a/src/pspm_dcm.m +++ b/src/pspm_dcm.m @@ -361,7 +361,7 @@ for vs = 1:numel(valid_subsessions) isbSn = valid_subsessions(vs); sbSn = subsessions(isbSn, :); - flanks = pspm_time2index(sbSn(2:3), data{sbSn(1)}{1}.header.sr); + flanks = pspm_time2index(sbSn(2:3), sr{sbSn(1)}); sbSn_data = y{sbSn(1)}(flanks(1):flanks(2)); sbs_miss = isnan(sbSn_data);