function w = blackman(N); w = zeros(1,N); for k=0:N-1 w(k+1) = 0.42 -0.5*cos(2*%pi*k/(N-1)) + 0.08*cos(4*%pi*k/(N-1)); end