Discrete Fourier transform matrix
A, that, when multiplied into a length-
x, computes the discrete Fourier transform
x. In other words,
y = A*x is
the same as
y = fft(x).
Ai = conj(dftmtx(n))/n
In practice, it is more efficient to compute the discrete Fourier transform with the FFT than with the DFT matrix. The FFT also uses less memory. The two procedures give the same result.
x = 1:256; y1 = fft(x); n = length(x); y2 = x*dftmtx(n); norm(y1-y2)
ans = 8.0399e-12
dftmtx takes the FFT of the identity matrix
to generate the transform matrix.