ecg2hr
Version 1.0.0 (1.45 KB) by
Safwan Mahmoud
A function to calculate the heart rate(HR) and the heart rate variability(HRV) from an ECG signal.
[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 LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
