What should be FFT of a constant function?
조회 수: 12 (최근 30일)
이전 댓글 표시
As per theory,FFT of a constant fn. is a DC value. But when I take an array 'A' of ones of size 172, i.e. A[1 1 1 1 1.....172 times]
FFT(A)
gives DC as well as AC cofts. Why?
댓글 수: 2
Image Analyst
2012년 12월 11일
The FFT breaks up the signal into a weighted sum of sinusoidal signals. Any point in an FFT not at the center is the weight (coefficient) of one of the sinusoidal signals that goes into making up the final signal. The center frequency is flat (no sinusoid) and is often called the DC component.
채택된 답변
Walter Roberson
2012년 12월 11일
Round-off error in the calculations. Look at the magnitudes: everything is down near 10E-15
댓글 수: 3
Muthu Annamalai
2012년 12월 11일
You have the details right, Image Analyst; while the rest of the comments are only partly true.
Image Analyst
2012년 12월 11일
If you're interested in seeing the sinc effect, I posted some nice demo code here: http://www.mathworks.com/matlabcentral/answers/56139#comment_116309
추가 답변 (1개)
Azzi Abdelmalek
2012년 12월 11일
편집: Azzi Abdelmalek
2012년 12월 11일
If you mean by AC, sinusoidal signal, when you calculate its FFT, it's important to define the interval. To give a sens to your FFT, you have to calculate it in one period. For the sinusoidal signal, the period is 2*pi, then theoretically, the result will be one value at k=1 and not at k=0 like in a constant signal.
t=0:.1:2*pi-0.1;
g=fft(sin(t));
stem(abs(g))
For a constant the result will be a constant for k=0; and 0 elsewhere
h=ones(1,length(t))
figure;
stem(abs(fft(h)))
참고 항목
카테고리
Help Center 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!