detectEcgWithAngle(ecg, fSInHz, varargin): Heartbeat detection using sample-to-sample angle
This is the complete implementation of the R-peak detector from Song, Cho, Kim & Lee proposed in "New real-time heartbeat detection method using the angle of a single-lead electrocardiogram", Computers in Biology and Medicine, 59 (2015). DOI: 10.1016/j.compbiomed.2015.01.05.
The detector is robust to noise and peak reversal and uses a single lead ecg signal. See the header of the function for a detailed description.
Cite As
David J. Mack (2026). detectEcgWithAngle(ecg, fSInHz, varargin): Heartbeat detection using sample-to-sample angle (https://uk.mathworks.com/matlabcentral/fileexchange/63184-detectecgwithangle-ecg-fsinhz-varargin-heartbeat-detection-using-sample-to-sample-angle), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Industries > Medical Devices > Cardiology > ECG / EKG >
Tags
Acknowledgements
Inspired by: Plot (Big)
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.4.0.0 | [!!!] Detection results may have changed for sampling rates ~= 200 Hz.
|
||
| 1.3.0.0 | [FIX] Crash when plotting empty detection results.
|
||
| 1.2.0.0 | Forgot to mention another modification:
|
||
| 1.1.0.0 | [FIX] Checks for optional dependencies now work properly. |
||
| 1.0.0.0 |
