Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search


DFT Matrix

The following example reinforces the discussion of the DFT matrix in §6.12. We can simply create the DFT matrix in matlab by taking the DFT of the identity matrix. Then we show that multiplying by the DFT matrix is equivalent to the calling the fft function in matlab:

>> eye(4)
ans =
     1     0     0     0
     0     1     0     0
     0     0     1     0
     0     0     0     1

>> S4 = fft(eye(4))
ans =
   1       1          1       1          
   1       0 - 1i    -1       0 + 1i
   1      -1          1      -1          
   1       0 + 1i    -1       0 - 1i

>> S4' * S4          % Show that S4' = inverse DFT (times N=4)
ans =
    4    0    0    0
    0    4    0    0
    0    0    4    0
    0    0    0    4

>> x = [1; 2; 3; 4]
x =
     1
     2
     3
     4
>> fft(x)
ans =
  10          
  -2 + 2i
  -2          
  -2 - 2i

>> S4 * x
ans =
  10          
  -2 + 2i
  -2          
  -2 - 2i


Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

[How to cite this work]  [Order a printed hardcopy]  [Comment on this page via email]

``Mathematics of the Discrete Fourier Transform (DFT), with Audio Applications --- Second Edition'', by Julius O. Smith III, W3K Publishing, 2007, ISBN 978-0-9745607-4-8
Copyright © 2024-04-02 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA