function [X] = dtft(x,n,w)
% Computes Discrete-time Fourier Transform
% [X] = dtft(x,n,w)
%
% X = DTFT values computed at w frequencies
% x = finite duration sequence over n
% n = sample position vector
% w = frequency location vector (NOT normalized)
% Last revised 3/5/97 - rms

numw = length(w);
X = zeros(1,numw);
for wi = 1:numw,
	X(wi) = sum(x.*exp(-j.*w(wi).*n));
end


