dftmtx [signal]
— Function File: d = dftmtx (n)

If n is a scalar, produces a n-by-n matrix d such that the Fourier transform of a column vector of length n is given by dftmtx(n) * x and the inverse Fourier transform is given by inv(dftmtx(n)) * x. In general this is less efficient than calling the fft and ifft directly.