Azzera filtri
Azzera filtri

Controlling findpeaks prominence behavior

28 visualizzazioni (ultimi 30 giorni)
geoweaser
geoweaser il 23 Feb 2023
Risposto: Samyuktha il 6 Apr 2023
I'm using findpeaks (v. R2022b) to identify peaks with a certain prominence in my data. For most datasets, the function works as I expect and desire, but I found a case where its output is undesirable:
findpeaks(TF,f,'MinPeakProminence',0.5,'Annotate','extents')
In the above case, findpeaks determined prominence for the indicated peak (inverted triangle) from nearly the entire curve. Thus, it overlooked two peaks to the left and one to the right. If this prominence aspect of the function worked as I'd like, it should not have identified any peaks, as there are none with heights above adjacent troughs greater than 0.5. Specifically, I would have preferred that the prominence be determined from the y-value of this adjacent trough (marked with an '*') to the y-value of the peak that is selected, yielding a prominence of ~0.15. I realize the behavior shown is by design (i.e., the "More About" Prominence section of the help page) but wonder if it can be controlled.
My question: Is it possible to configure findpeaks so it does not ignore adjacent troughs in its prominence determination for a given peak?
  1 Commento
Star Strider
Star Strider il 24 Feb 2023
That appears to be consistent with the example in Prominence.
I don’t have the data you’re using in your example, so I can’t test this, however combining it with 'MinPeakDistance' could work. You would need to do those experiments with your data.
.

Accedi per commentare.

Risposte (1)

Samyuktha
Samyuktha il 6 Apr 2023
Hi Geoweaser,
I understand that you want to configure 'findpeaks' so it does not ignore adjacent troughs in its prominence determination for a given peak.
Because a peak's 'prominence' evaluates how much it stands out due to its inherent height and placement in relation to other peaks, the behaviour of 'MinPeakProminence' cannot be altered.
Also please check if 'MinPeakDistance' is set to its default value '0' as this argument is used to ignore small peaks that occur in the neighbourhood of a larger peak.
More information can be found in the following documentation link:
Hope it helps!

Categorie

Scopri di più su Time and Frequency Domain Analysis in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by