N = 8
n = [0:N-1];
figure
for k=n
    subplot(N,2,2*k+1)
    bar(n,cos(2*pi*k*n/N));axis([-0.5 N-0.5 -1 1])
    subplot(N,2,2*k+2)
    bar(n,sin(2*pi*k*n/N));axis([-0.5 N-0.5 -1 1])
end
