HRV calculation with RRI values
Show older comments
Hi, I need to calculate the HRV in the frequency domain which is the smallest ratio LF/HF. I got these RRI values: RR_intervals = [RR_intervals = [0.848, 0.901, 1.032, 0.968, 0.834, 0.848, 1.069, 1.066, ...
0.898, 0.866, 0.902, 0.984, 0.899, 0.816, 0.885, 1.099, ...
1.032, 0.831, 0.819, 1.082, 1.115, 1.052, 0.95, 0.964, ...
1.034, 1.016, 0.866, 0.784, 0.848, 1.053, 0.999, 0.848, ...
0.866, 1.067, 0.984, 0.866, 0.966, 1.067, 1.049, 0.869, ...
0.833, 0.916, 1.049, 0.916, 0.817, 0.85, 1.001, 0.981, ...
0.818, 0.8, 0.901, 1.016, 0.915, 0.853, 0.932, 1.034, ...
0.882, 0.801, 0.817, 0.916, 0.836, 0.78, 0.784, 0.91] How should i proceed?
% Convertir les intervalles RR en millisecondes
RR_intervals_ms = RR_intervals * 1000;
% Calculer la transformée de Fourier des intervalles RR
N = length(RR_intervals_ms);
Y = fft(RR_intervals_ms - mean(RR_intervals_ms)); % Enlever la moyenne pour réduire le bruit DC
P2 = abs(Y/N);
P1 = P2(1:N/2+1);
P1(2:end-1) = 2*P1(2:end-1);
% Fréquences correspondantes
fs = 4;
f = fs*(0:(N/2))/N;
% Conversion des fréquences en BPM
f_bpm = f * 60;
% Plages de fréquences basses (LF) et hautes (HF)
LF_band = [0.04 0.15];
HF_band = [0.15 0.4];
Accepted Answer
More Answers (0)
Categories
Find more on Signal Generation, Analysis, and Preprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!