Identifying QRS point in ECG signal

4 views (last 30 days)
Hi guys, I'm trying to find the QRS point from the ECG signal that I had been given. I had found the R peak, however, I couldn't code the Q and S point. Can someone please help me to check my coding if there is something wrong with it?
load('Sample_1.mat')
%The recording were digitized at 360 seconds per second with 11 bits
%resolution over mV range.
length(Orig_Sig) = 3600;
D = 1:3600;
t = D./360;
Fs = 360;
%plot noisy signal
figure
subplot(211), plot(t,Orig_Sig);
title('Original ECG Signal')
%lowpass Butterworth filter
fNorm = 25 / (Fs/2);
[b,a] = butter(10, fNorm, 'low');
y =filtfilt(b, a, Orig_Sig);
subplot(212), plot(t,y);
title('Filtered ECG Signal')
[R1,TR1] = findpeaks(y,t,'MinPeakHeight',1000);
[Q1,TQS1] = findpeaks(-y,t,'MinPeakHeight',-850,'MinPeakDistance',0.5);
figure
plot(t,y)
hold on
plot(TR1,R1,'^r')
plot(TQS1(1:2:end), -Q1(1:2:end), 'vg')
plot(TQS1(2:2:end), -Q1(2:2:end), 'vb')
hold off

Accepted Answer

Star Strider
Star Strider on 11 May 2020
That is an interesting EKG. It displays frequent unifocal PVCs with obvious retrograde conduction, blocking the subsequent P-wave.
As much as I like findpeaks, the islocalmin function might be more appropriate, since you can use the ProminenceWindow name-value pair, and others not available in findpeaks. That might be easier with respect to locating the Q and S waves. In any event, the findpeaks MinPeakProminence parameter with or in place of MinPeakHeight may be more valuable than MinPeakHeight alone.
Also, the 25 Hz lowpass filter cutoff frequency is a bit restrictive and could obscure some detail. Experiment with a 45 Hz cutoff and see if that improves your ability to detect the Q and S deflections.
  5 Comments
Ilmiat
Ilmiat on 1 Nov 2020
Hi
can you kindly tell me how to find P wave and T wave after that? on this same signal?
thanks in advance

Sign in to comment.

More Answers (0)

Categories

Find more on Measurements and Feature Extraction in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!