[t,v,lab] = hrpowsp(times,vals,labels,bands,detrend,goodlabel)
times
| Column vector of times at which the data occur. |
vals
| Column vector of data |
labels
| Column vector of flags indicating validity of the data (1==valid) |
bands
|
A Nx2 matrix giving the frequency limits (in Hz) of the bands over
which integration is to be done. The default value is:
bands = [ 0 0.003;
0.003 0.04;
0.04 0.15;
0.15 0.4; ];
which are the limits suggested in the Task Force paper referenced below.
The times information is used to convert these bands
to the proper FFT representation, so it is critical that the
times information be correct and in the correct units.
|
detrend
| An integer indicating whether or not to subtract a polynomial trend from the data, and if so, what order polynomial to use. By default, this is set to 1, which indicates to subtract a linear trend. 0 indicates to subtract the mean. A negative number means to do nothing at all. |
t
| The times of the returned values. This will be the min and max time of the segment analyzed. |
v
|
The energies in each band. These are normalized according to the
following principles. If vals is heart rate in beats per minute,
then the units of the returned values are
(beats per minute)^2 / secondMore generally, if vals is in the units foo,
then the returned values are in
(foo)^2 / second
|
labs
|
The fraction of invalid data in vals
|
hrpowsp computes the energy in specified frequency bands
in the time series vals. This is a multistep process:
hrspline)
detrend
(detrend)
bands to the corresponding frequency bins
in the fft, using the times data.
WARNING The times argument is used to scale the
bands information to be in the right format for the FFT
band integration. It is therefore critical that the times
information be correct, and that it be in units of seconds. (Of course,
if you specify your bands in cycles/year rather than cycles/sec (Hz), then
you should give times in the commensurate units, i.e., years.)
segstats.