how to get the index value of maximum peak in fft domain?

조회 수: 25 (최근 30일)
anam zahra
anam zahra 2017년 12월 21일
편집: Star Strider 2017년 12월 21일
i have various frequency components in fft domain. f1,f2,f3,f4,f5. lets suppose our maximum peak lies on frequency f2. i want to extract f2(with respect to the maximum amplitude) and discard rest of the frequencies. How can i do this? it's kind of saturation in frequency domain.. can anybody help me please?

답변 (1개)

Star Strider
Star Strider 2017년 12월 21일
편집: Star Strider 2017년 12월 21일
If you have the Signal Processing Toolbox, use the findpeaks (link) function.
Be sure that the information you give findpeaks, especially for a one-sided Fourier transform, are the same frequency and amplitude values that you give to the function you use to plot the same information.
EDIT The max function — with two outputs — will also work. It will only detect the first maximum, so if you use it, you will need to subtract the mean of your signal before using the fft function. This removes the possibility of the maximum being the value of the d-c or constant offset:
FTsignal = fft(signal - mean(signal))/length(signal);
then:
[maxpeak, maxpeakindes] = max(abs(FTsignal)*2);
will give you the data you want.
See the documentation on fft (link) for relevant information.

카테고리

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