Can I make the loop not count the t-waves in a ECG signal?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Maria Goncalves Møller
am 17 Mai 2018
Beantwortet: Sandro Lecci
am 17 Mai 2018
Hi, I have trouble making my matlab loop count only my R waves of the ECG signal. The loop counting the peaks is:
thr = 40;
beat_count = 0;
for k = 2 : length(sig)-1
if( sig(k) > thr && sig(k-1) < thr)
beat_count = beat_count + 1;
id(beat_count) = k;
end
end
Some of the T-waves is the same height. I suggest making some sort of delay, so that the counter won't count until 0.3 seconds have passed since that is the maximum speed of the heart beats, and any peak within this time must be a t-wave. Can anybody help with this?
0 Kommentare
Akzeptierte Antwort
Sandro Lecci
am 17 Mai 2018
Dear Maria,
Consider using the function findpeaks with the 'MinPeakDistance' argument (that works as a refractory period)
[pks,locs] = findpeaks(sig, 'MinPeakDistance', 300)
where 300 is 0.3 seconds with an hypothetical 1kHz resolution of your signal.
Best, Sandro
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu ECG / EKG finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!