This is the test page, like a sandbox, where you can try whatever you want.
function S = DFTsum(x) N = length(x); S = zeros(1, N); n = 1:N; for k = 1:N S(k) = sum(x(n) .* exp(-j*2*pi*(k-1)*(n-1)/N)); end end