Controlling findpeaks prominence behavior
32 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Star Strider
el 24 de Feb. de 2023
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.
.
Respuestas (1)
Samyuktha
el 6 de Abr. de 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!
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!