15.11.2014 Views

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3 Fast Fourier Transform (FFT)<br />

Introduction<br />

For length N input sequence x, the DFT is a length N vector, X. fft and ifft<br />

implement the relationships<br />

N<br />

– j2π( k – 1) ------------<br />

n – 1<br />

⎝<br />

⎛ N ⎠<br />

⎞ 1 ≤ k ≤ N<br />

Xk ( ) = xn ( )e<br />

xn ( ) =<br />

∑<br />

n = 1<br />

N<br />

1<br />

N<br />

---- ∑<br />

Xk<br />

k = 1<br />

( )e<br />

j2π( k – 1) ------------<br />

n – 1<br />

⎝<br />

⎛ N ⎠<br />

⎞ 1 ≤ n ≤ N<br />

Note Since the first element <strong>of</strong> a <strong>MATLAB</strong> vector has an index 1, the<br />

summations in the equations above are from 1 to N. These produce identical<br />

results as traditional Fourier equations with summations from 0 to N-1.<br />

If x(n) is real, you can rewrite the above equation in terms <strong>of</strong> a summation <strong>of</strong><br />

sine and cosine functions with real coefficients:<br />

xn ( )<br />

where<br />

=<br />

N<br />

1<br />

2π( k – 1) ( n – 1)<br />

---- ak ( ) ⎛------------------------------------------<br />

⎞<br />

2π( k – 1) ( n – 1)<br />

cos<br />

bk ( )<br />

N ∑<br />

+ ------------------------------------------<br />

⎝ N ⎠<br />

sin ⎝<br />

⎛ N ⎠<br />

⎞<br />

k = 1<br />

ak ( ) = real( Xk ( )), bk ( ) = –imag( Xk ( )), 1 ≤ n ≤ N<br />

Finding an FFT<br />

The FFT <strong>of</strong> a column vector x<br />

x = [4 3 7 -9 1 0 0 0]' ;<br />

is found with<br />

y = fft(x)<br />

3-2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!