Superimposing/Overlaying Points on a Graph

4 views (last 30 days)
N. Alfred
N. Alfred on 16 Jun 2022
Commented: William Rose on 17 Jun 2022
I am tryiing to make ecg cycles overlap in a plot. I have an ecg with multiple cycles (P-QRS-T) and i'd like them to overlap each other and appear as though the was just one.
I would be very greatful for any help i can get.
P= 60/120800;
grid minor;
that is my code to plot the data.
now i'd like the peaks to overlap each other.
my data is included below.

Answers (1)

William Rose
William Rose on 16 Jun 2022
@N. Alfred, to make the plots "appear as though there was just one", we should identify identiy the R-waves, use those to chop th signal into separate beats, and rescale the time axis to make each peak be at the same time in the recscaled time ais. Then we rescale the vertical axis so the peak heights also match, and so that the baseline matches. Define the baseline by the "isoelectric line" which is the level of the T-to-P segment.
William Rose
William Rose on 17 Jun 2022
@N. Alfred, The attached code plots the EKGs of all beats, superimposed, using the approach I suggested. This plot also includes the mean EKG, in red. It also plots the EKGs of the first 6 beats only, so that you can see the details of how different beats differ. The variation from beat to beat means that It is impossible to make all these EKGs look like one beat, as you requested in your original posting. They differ in their start and end times, min and max of QRS complex, P waves, T waves, etc.
The plots generated by the script are shown below.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by