detectEcgWithAngle(​ecg, fSInHz, varargin): Heartbeat detection using sample-to-sample angle

Implementation of the R-peak detector using the angle between successive samples.

220 Downloads

Updated 8 Feb 2018

View License

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 (2023). detectEcgWithAngle(ecg, fSInHz, varargin): Heartbeat detection using sample-to-sample angle (https://www.mathworks.com/matlabcentral/fileexchange/63184-detectecgwithangle-ecg-fsinhz-varargin-heartbeat-detection-using-sample-to-sample-angle), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on ECG / EKG in Help Center and MATLAB Answers
Acknowledgements

Inspired by: Plot (Big)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.4.0.0

[!!!] Detection results may have changed for sampling rates ~= 200 Hz.
[FIX] Reintroduced the DESIGNFILT call for sampling rates ~= 200 Hz to get the filter coefficient right.
[FIX] Crash when plotting detection results with only 1 peak.

1.3.0.0

[FIX] Crash when plotting empty detection results.
[FIX] Crash when plotting data with all-normal rr intervals.
[ADD] New optional input 'minTStartInSec' to remove erroneous detections at the start of the recording.

1.2.0.0

Forgot to mention another modification:
[MOD] The transfer function representation of the bandpass-filter is now to avoid calling the slow DESIGNFILT method every time. This also removes the according dependency.
- [FIX] Error in the description which stated useBaselineCorrection as being false by default, which it isn't.
- [MOD] If rPeakAmps is not requested as output and showPlot==false, baseline correction will now silently be turned off for speed.

1.1.0.0

[FIX] Checks for optional dependencies now work properly.

1.0.0.0