Skip to content

Commit b442f8d

Browse files
committed
Small fix to set_insert_markers (stray exp_endfun)
1 parent 8e0b0bd commit b442f8d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

code/dataset_editing/set_insert_markers.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@
236236
% for each potential interval start...
237237
for k=1:length(starts)-1
238238
valid = true;
239-
% the range of event indices from start marker to next end marker
239+
% the range of event indices from start marker to next end marker prior to the
240+
% subsequent start marker
240241
scan_range = starts(k) : starts(k) + find(ends(starts(k)+1:starts(k+1)-1),1);
241242
if length(scan_range) >= 2
242243
% the range excluding the start and end marker
@@ -292,7 +293,7 @@
292293
% check the segment length
293294
seg_length = coverage/signal.srate;
294295
if seg_length < opts.minlen || seg_length > opts.maxlen
295-
exp_endfun; return; end
296+
return; end
296297
% hande the spacing method
297298
if strcmp(opts.counting,'persecond')
298299
opts.count = max(1,round(opts.count*(ival(2)-ival(1))/signal.srate)); end

0 commit comments

Comments
 (0)