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

50 ビュー (過去 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 Center および File ExchangeDescriptive Statistics についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by