function y = filtmin(a, w)
% Magnitude response of FIR filter.

n = length(a);
y = cos(w'*(0:n-1)*2*pi)*a;