Finding time interval between 2 peaks

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?

 Accepted 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.

2 Comments

I don't think I have the Signal Processing Toolbox but I'm going to download it and see if I can get something working. Thank you for taking the time to respond.
My pleasure.
If you’re doing biomedical signal analysis, the Signal Processing Toolbox is necessary. You will need it for filtering and time-frequency analysis as well as peak-finding.
There are peak-finding routines on the File Exchange as well. (I’ve not used them so I’ve no experience with them.)

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!