About FFT of sine wave
    39 ビュー (過去 30 日間)
  
       古いコメントを表示
    
Dear Forum
i just do the FFt of a sine wave :
t=0:0.01:1; A=sin(2*pi*10*t);
The FFt is:
U=fft(A,200); plot(abs(U));
Question is why the amplitude of fft is 50 and not 1 (convolution betwen sine wave spectrum and rect spectrum 1*1*sincf
Many thanks
Roberto
0 件のコメント
回答 (2 件)
  Wayne King
    
      
 2012 年 11 月 2 日
        
      編集済み: Wayne King
    
      
 2012 年 11 月 2 日
  
      It is because you have 101 points in your signal. Therefore the magnitude of the DFT at the frequency is going to be approximately N/2 where N is the number of points. If your sine wave had an amplitude other than 1, you would see NA/2
To make this exact, let's create your sine wave with 100 points so that the frequency of 10-Hz falls directly in a DFT bin
   t = 0:0.01:1-0.01;
   x = cos(2*pi*10*t);
   xdft = fft(x);
   plot(abs(xdft))
Now you see the magnitude at -100 and 100 Hz is 100/2=50
Change the amplitude of the sine wave:
   x = 3*cos(2*pi*10*t);
   xdft = fft(x);
   plot(abs(xdft))
Now the magnitude at -100 and 100 Hz is (3N)/2=150
This dependence on N comes from the fact that the DFT sums all the element-by-element products of your signal and complex exponentials with frequencies of (kFs)/N where Fs is the sampling frequency and N is the length of the signal and k=0,1,2,3, N-1
When your signal matches the frequency of one of those complex exponentials exactly, as is the case above, you get the coherent sum that results in N times the amplitude. Since your input is a cosine remember that results in TWO complex exponentials each with amplitude 1/2 the amplitude of the cosine.
0 件のコメント
  Merve Karabakla
 2021 年 6 月 5 日
        x = sin(2*pi*n*0.01)       ( 0 ≤ n ≤ 200 )
What is its Fourier transform? Obtain and plot its magnitude spectrum
0 件のコメント
参考
カテゴリ
				Help Center および File Exchange で Fourier Analysis and Filtering についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


