function DCT = dct_matrix(N)

k = (0:N-1);
phase = pi/N * k' * ( k + 0.5 );
DCT = sqrt(2/N) * cos(phase);
DCT(1,:) = DCT(1,:)/sqrt(2);

end
