Controlling findpeaks prominence behavior

조회 수: 29 (최근 30일)
geoweaser
geoweaser 2023년 2월 23일
답변: Samyuktha 2023년 4월 6일
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
Star Strider
Star Strider 2023년 2월 24일
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.
.

댓글을 달려면 로그인하십시오.

답변 (1개)

Samyuktha
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!

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by