How to plot RR interval?

조회 수: 64 (최근 30일)
Luca Merolla
Luca Merolla 2020년 9월 23일
댓글: Bhupati kumar 2020년 10월 15일
Hello everyone!
I have an RR interval (attached) extracted from an ECG signal that was sampled at 500 Hz. The R peaks and their indices were extracted using findpeaks(), then the diff() function was used on the R indices (expressed in seconds) to calculate the RR interval. The RR interval was converted in milliseconds following the standard procedure. Below an extract from the code:
[qrspeaks, locs] = findpeaks(iwt, time, "MinPeakHeight", 0.5, ...
"MinPeakDistance", 0.42);
% RR interval
RR = diff(Rindex);
RR = RR'.*1000; % conversion in ms
Now I should plot this signal on the y-axis, while on the x-axis I should have the time (in seconds) at which the heart beat occurs.
I need the time in seconds of the RR interval also for the spline interpolation of the signal. I would like to start interpolating from the first value of the signal, so to avoid the extra values between 0 and the first value of the RRI. I attached a plot as an example to make myself more clear. Below the code for the interpolation:
x = 1:length(RR);
xq = 0:0.25:length(RR); % Instead of 0 I would like the first index value of the RRI
s = spline(x, RR, xq);
timespline = (1:length(xq))/4;
If you have different suggestions feel free to share, they're always welcome!
Thank you in advance for your reply!
  댓글 수: 1
Bhupati kumar
Bhupati kumar 2020년 10월 15일
how do i get rr indices?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by