function W = Dftmatrix(N) % computes the DFT matrix of order n wN = exp(-2*pi*1i/N); ind = [0:N-1]'*[0:N-1]; W = wN.^ind ; end