how to detect peaks in a particular range?

조회 수: 5 (최근 30일)
ankita
ankita 2014년 3월 5일
댓글: Asatur Khurshudyan 2020년 1월 29일
I have a plot between 0-2000 Hz. I want to find peaks between 0-135 Hz only. I am using 'findpeaks' to detect the peaks but there is no way to extract the peaks within a particular limit. Can somebody suggest any method?

채택된 답변

Mischa Kim
Mischa Kim 2014년 3월 5일
편집: Mischa Kim 2014년 3월 5일
Ankita, you could simply limit your data in
[pks,locs] = findpeaks(data)
to cover only the frequency range between 0 and 135 Hz. For example, if your data is a 1-by-2001 vector (assuming x-vals to be evenly spaced) you could do
[pks,locs] = findpeaks(data(0:135))
  댓글 수: 1
Asatur Khurshudyan
Asatur Khurshudyan 2020년 1월 29일
What is the data are not evenly spaced? In my example,
findpeaks(data(0:135))
does not work.

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

추가 답변 (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