function g = dft_basis( N, varargin )

	g = zeros(N,N);
	if nargin==1
		for k=0:N-1
			g(:,k+1) = 1/sqrt(N) * exp(j*2*pi*k*(0:N-1)/N)';
		end
	else
		for k=0:N-1
			g(:,k+1) = exp(j*2*pi*k*(0:N-1)/N)';
		end
	end