hi, i want to get the interval of P-R and Q-T and the QRS duration from a data set tahts a ECG but also a graph that can display the ecg with the the peak, P wave and T wave with the P R Q T S being labelled. what i have currently is below
fresult(1 : round(length(fresult)*6/samplingrate))=0;
fresult(end - round(length(fresult)*6/samplingrate) : end)=0;
[R2,TR] = findpeaks( EKG, t, 'MinPeakHeight', 50);
[QS,TQS] = findpeaks(-EKG, t, 'MinPeakHeight', 75);
plot(TR, R2, '^r')
plot(TQS(1:2:end), -QS(1:2:end), 'vg')
plot(TQS(2:2:end), -QS(2:2:end), 'vb')
axis([0 2 ylim])
legend('EKG', 'R', 'Q', 'S')
this is what i hgave so far, its only creating a grpah that isnt working but the ecg data should be processed into a relatively smooth line.
i ahve also attached the ecg data below.