Controlling findpeaks prominence behavior
34 次查看(过去 30 天)
显示 更早的评论
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')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1305100/image.png)
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 个评论
Star Strider
2023-2-24
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.
.
回答(1 个)
Samyuktha
2023-4-6
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Time and Frequency Domain Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!