MATLAB: Finding time interval between 2 peaks

ekg

I downloaded a sample EKG signal to test some digital filtering techniques in Matlab, but I am unsure of how I could obtain the time interval between 2 peaks. Does anyone know how I could get started with this?

Best Answer

If you have the Signal Processing Toolbox, use the findpeaks function. It has a number of name-value pair arguments that make R-wave detection (assuming a Lead II) straightforward. It will require some experimentation.