N=4 x=[1,2,3,4] xhat=Array{Complex}(undef,N) for l=0:N-1 a=exp.(-1im*2*pi*l/N*(0:N-1)) xhat[l+1]=a'*x end println("x=",x) println("xhat=",xhat)