[ntimes,nvals,nlabels] = hrtach(starttime,rrintervals,labels,
sr,goodlabel);
starttime
| The time stamp of the first RR interval occurred. This is used only to set the timestamps of the tachometer output. |
rrintervals
| A column vector of RR intervals, in seconds. |
labels
| A column vector giving a label for each RR interval, marking it as valid or invalid. |
sr
| Desired sampling rate (samples/second) of the tachometer output. Default: 4 |
goodlabel
| The numerical code corresponding to valid data. Default: 1 |
ntimes
| The time stamps of each of the tachometer samples |
nvals
| The values of "instantaneous heart rate," according to the Berger algorithm. |
nlabels
| Labels indicating the validity/invalidity of each tachometer data point. A point is marked as valid only if all of the RR intervals that were involved in the calculation of that data point are valid. |
Translates RR intervals (seconds) into heart rate (beats/minute) evenly sampled in time. This is done using the method proposed by Berger: a continuous signal is constructed that is piecewise constant and whose value during any RR interval is 60/rr. This continuous signal is anti-alias filtered using a boxcar of width twice the interval between samples, and then sampled, producing the output.
The algorithm is specifically intended for translating RR intervals into a signal with "nice" properties for spectral analysis. (In the Berger paper, "nice" means that the tachometer output has a form close to that of the hypothetical input to the integrate-and-fire system which could have produced the RR interval sequence.
If you seek simply to translate an unevenly sampled signal into
an evenly sampled one, see spline.
spline