function A = DFTbasis(N) %define N by N matrix of DFT basis vectors %define Nth root of unity z = exp(2*pi*i/N); for p = 0:N-1 for q = 0:N-1 A(p+1,q+1) = z^(p*q); end end end