how to find duration of peak; starting and ending points
85 views (last 30 days)
Show older comments
Raheema Al Karim Damani
on 25 Feb 2020
I've used findpeaks to isolate the largest peak in my signal. I wanted some help in finding the duration of the peak aka the starting and ending points of this peak, so that I could calculate area under curve? Right now Im having to visually inspect and pick arbitrary points to define this start and end points.

0 Comments
Accepted Answer
Star Strider
on 25 Feb 2020
Experiment with ths ischange function, and if you have the Signal Processing Toolbox, the findchangepts function.
7 Comments
More Answers (2)
Sindar
on 25 Feb 2020
widths are an optional output from findpeaks:
[pks,locs,widths,~] = findpeaks(data);
2 Comments
Alexis
on 9 Jul 2021
Edited: Alexis
on 9 Jul 2021
I had a similar issue, although I was working with biological signals. You could try the function I wrote to solve my problem: https://uk.mathworks.com/matlabcentral/fileexchange/81066-breathtimes?s_tid=srchtitle
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!