Selection Portions of a Plot

조회 수: 3 (최근 30일)
T
T 2012년 10월 18일
Suppose I have this function with multiple peaks that ranges from time = 2000 s to time = 7000 s.
Suppose there are five peaks and they are seperated evenly apart.
Suppose I want to pick the third peak.
How would I do this in MATLAB?

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2012년 10월 18일
편집: Azzi Abdelmalek 2012년 10월 18일
t=0:0.1:30
y=sin(t)
[peaks,idx]=findpeaks(y)
%the third peak is
peaks(3)
  댓글 수: 3
Azzi Abdelmalek
Azzi Abdelmalek 2012년 10월 18일
can you post your data using a link
Star Strider
Star Strider 2012년 10월 18일
The findpeaks function is part of the Signal Processing Toolbox.

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by