ecg2hr

A function to calculate the heart rate(HR) and the heart rate variability(HRV) from an ECG signal.
9 Downloads
Updated 18 Apr 2024

View License

[hr, hrv] = ecg2hr(signal,fs)
Input:
signal: ECG signal - 1d array
fs: sampling frequency in Hz - integer
output:
hr: heart rate (beat/min)
hrv: heart rate variability (SDNN method)
notes: the algorithm is robust against common noises such as baseline wandering.

Cite As

Safwan Mahmoud (2026). ecg2hr (https://se.mathworks.com/matlabcentral/fileexchange/163976-ecg2hr), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2023b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0