konoha - try the following
N = 3;
F = zeros(N,N);
for u=1:N
for v=1:N
F(u,v) = exp((u-1)*(v-1)*2*pi);
end
end
You need to use a combination of u and v in the equation in order to get the pattern that you describe above (or found at https://en.wikipedia.org/wiki/DFT_matrix).