How to find peaks and troughs of a graph?

3 ビュー (過去 30 日間)
Zamzam
Zamzam 2015 年 8 月 3 日
コメント済み: Star Strider 2015 年 8 月 4 日
the function findpeaks will find the hall peaks (top and bottom), and I want to find the top peaks and bottom peaks separately. I know that I have to specify a limit (value) and say: if any number above this value consider it as peak, else consider it as trough, but I don't know how to transfer it into a matlab code? I am dealing with vectors: pks=findpeaks(RunUp.Set4(x,y)); x is time y is a second column in a file, this column contains the peaks, so I should play with numbers of this variable(y) to get the peaks and troughs Thanks

採用された回答

Star Strider
Star Strider 2015 年 8 月 3 日
To get the troughs, use findpeaks on the negative of your signal, in a separate call to findpeaks. This turns the troughs into peaks, and findpeaks will locate them as well.
  2 件のコメント
Zamzam
Zamzam 2015 年 8 月 4 日
Appreciate your prompt reply. one more question,how to do it matlab?
Star Strider
Star Strider 2015 年 8 月 4 日
My pleasure.
You have to describe your problem in a bit more detail, probably posting relevant parts of your code (and data) with what you have and what you want.
It seems to me you are doing it in MATLAB. What do you mean by ‘how to do it matlab’?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by