Skip to main content
. 2023 Feb 6;23(4):1807. doi: 10.3390/s23041807
Algorithm 1 Percentage of missing data for each HRV window
  • 1:

    for each RR[i] in the window (i from 1 to length of HRV window) do

  • 2:

        Compute         gap=T[i]T[i1]

  • 3:

        if gap> 1.3 s then

  • 4:

            Compute mean RR over last 10 values (meanRR)

  • 5:

            Compute N, the number of missing RR in the gap:         N=Floorvalue(gapRRmean)

  • 6:

        end if

  • 7:

        Compute Ntot, the total number of missing RR in the window Ntot=N

  • 8:

        Compute percentage of missing data: Pmissing=100NtotLengthofwindow+Ntot

  • 9:

    end for

 RR[i] is the RR value at position i, and T[i] its timestamp