Magnitude scaling in FFT and Periodogram
이전 댓글 표시
Hi all, I am trying to use to matlab(with signal processing tool box option) to look at FFT of sin waves.
It looks the fft function does not output magnitude correctly without a few more lines of code.
The code for scaling the fft correctly for DC and all frequency bins is given in the link below
Is there similar code for scaling the magnitude's when using the periodogram function ?
I understand the code listed in the link above essentially does the function of periodogram. But there is more is more than one reason why scaling the periodogram function similarly would be very helpful.
regards
SRS
채택된 답변
추가 답변 (2개)
Wayne King
2011년 9월 15일
1 개 추천
Hi, bin 101 is not equivalent to 101 Hz. The bins are spaced in 1 Hz increments in this case, but you are forgetting that the first bin is DC, zero frequency.
Wayne
Wayne King
2011년 9월 15일
psdest = psd(spectrum.periodogram,x,'Fs',1e3,'NFFT',length(x));
psdest.Data
has the periodogram values (not in dB),
psdest.Frequencies
has the frequencies.
The plot() method knows how to act on this object, so
plot(psdest)
produces a plot in dB.
Wayne
카테고리
도움말 센터 및 File Exchange에서 Spectral Measurements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!