MATLAB Answers

I am trying to use the "findpeaks" function to find the peak in a set of data.

2 views (last 30 days)
BP
BP on 10 Sep 2021
Edited: DGM on 10 Sep 2021
I am trying to use the "findpeaks" function to find the peak in a set of data. I want to better understand how the function works. Please explain what is the purpose of the number "7000" in the line below? It finds several peaks when this number is low. It only finds one when this number is 7000 or higher.
[ymx,idx] = findpeaks(y, 'MinPeakProminence',7000);

Answers (1)

DGM
DGM on 10 Sep 2021
Edited: DGM on 10 Sep 2021
The documentation for findpeaks explains it better than I could:
"The prominence of a peak measures how much the peak stands out due to its intrinsic height and its location relative to other peaks. A low isolated peak can be more prominent than one that is higher but is an otherwise unremarkable member of a tall range."
The documentation of the MinPeakProminence KVP:
An explanation of the prominence algo:

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!