필터 지우기
필터 지우기

Help locating peaks

조회 수: 1 (최근 30일)
Jimes Tooper
Jimes Tooper 2011년 12월 13일
Hello all,
Here's an interesting problem...I have a vector full of results that are plotted against their respective FFT bins. When I go to find their peaks using [pks, locs] = findpeaks(x)...LOCS are obviously not the values of the actual bins, but instead are just indices of the bins.
How could I match the bin values to these indices instead, much appreciated!
JT

채택된 답변

Walter Roberson
Walter Roberson 2011년 12월 13일
"values of the actual bins" is not well-defined here. Do you mean the frequency that corresponds to the bin number?
If so then as Wayne King posted earlier this year,
the DFT bins are spaced at intervals of Fs/N where N is the length of the DFT vector and Fs is the sampling frequency. The first bin is zero frequency.
Thus, ((sampling frequency) times (fft bin number minus one) divided by (length of fft result)) gives frequency associated with the bin number.

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