I'm new to Matlab. I'm doing ECG analysis. first, I have calculated the R peaks of the ECG signal, then I have calculated the RR interval from the index of R peaks, so I got RR_interval vector (1x7831 double). Now, I need to create a sliding window with width of N=158 samples over RR_interval vector to extract some frequency-domain features using the power spectral density (PSD), For example, for each part of the windowed signal 3 features need to be calculated such as1)LF: Power of the low-frequency band (0.04–0.15 Hz) in a PSD,2)HF: Power of the high-frequency band (0.15–0.4 Hz) in a PSD,3)LF/HF: Ratio of LF to HL.
I'm looking for someone to help me finding a tutorial or sample code for extracting frequency-domain features using the power spectral density (PSD) in Matlab. PLEASE HELP!