Skip to content

Commit d78487b

Browse files
committed
Set effective_srate to 0 for empty streams when JitterRemoval is off
1 parent 4ed6298 commit d78487b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

load_xdf.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,12 @@
566566
else
567567
% calculate effective sampling rate
568568
for k=1:length(temp)
569-
temp(k).effective_srate = (length(temp(k).time_stamps) - 1) / (temp(k).time_stamps(end) - temp(k).time_stamps(1)); end
569+
if ~isempty(temp(k).time_stamps)
570+
temp(k).effective_srate = (length(temp(k).time_stamps) - 1) / (temp(k).time_stamps(end) - temp(k).time_stamps(1));
571+
else
572+
temp(k).effective_srate = 0;
573+
end
574+
end
570575
end
571576

572577
% copy the information into the output

0 commit comments

Comments
 (0)