function H = DTFT(h,N)

% DTFT --  Discrete Time Fourier Transform (not Fast)
%  Usage
%    H = DTFT(h,N)
%  Inputs
%    h      input coefficients
%    N      dimension (must be dyadic)
%  Outputs
%    H      the DTFT
%  Description
%    Computes the Discrete Time Fourier Transform
%  Note
%    length(h) can be at most 2*N

n = length(h);
i = sqrt(-1);
omega = (-N:N)*pi/N;
term = ones(n,2*N+1);

for k = 1:n
   term(k,:) = h(k)*exp(-i*omega*(k-1));
end

H = sum(term);
