How do i find the amplitude of a peak in my plot?

조회 수: 16 (최근 30일)
Alex Sam Thomas
Alex Sam Thomas 2019년 3월 12일
댓글: mart benjamin 2021년 11월 8일
I want to find the peak with the most height(not the maximum y value, but the distance from the local minima just before the peak to the peak). Kindly help out.
  댓글 수: 1
madhan ravi
madhan ravi 2019년 3월 12일
편집: madhan ravi 2019년 3월 12일
Perhaps:
PEAKS=findpeaks(y);
max(abs(diff(PEAKS)))

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

채택된 답변

Star Strider
Star Strider 2019년 3월 12일
I want to find the peak with the most height(not the maximum y value, but the distance from the local minima just before the peak to the peak).
That seems to be defined by the ‘prominence’ of the peak. You can set a minimum for it as 'MinPeakProminence' (link) if you already know what it is, or you can have findpeaks output it in the p (link) output.
  댓글 수: 2
Alex Sam Thomas
Alex Sam Thomas 2019년 3월 20일
That worked. Thank you.
Star Strider
Star Strider 2019년 3월 20일
As always, my pleasure.

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

추가 답변 (1개)

Raghunandan V
Raghunandan V 2019년 3월 12일
Hello,
Find the slope for each case. When there is change in slope from positive to negative, its a peak. If the slope changes from negetive to positive then its a crust.
formula for slope is (Y2 - Y1) / (X2 - X1)
  댓글 수: 2
Alex Sam Thomas
Alex Sam Thomas 2019년 3월 12일
편집: Alex Sam Thomas 2019년 3월 12일
thank you for your answer. But I don't want to to see if it is a peak. I have the peaks and i want to find the one with the biggest amplitude.
mart benjamin
mart benjamin 2021년 11월 8일
ymax=max(y)

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

카테고리

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

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by