function y = blackman(n)
%y=blackman(n)
%n - number of window points
%y - n-point Blackman's window function

%       S.Halevy 7/31/92
%       Copyright (c) 1992 by the MathWizards

%wa = [7938 -9240 1430]/18608;   % exact Blackman window
wa = [0.42 -0.50 0.08];          % standard Blackman window

wn = length(wa);

y = wa(1);

for k=2:wn
   % y += wa(k)*cosw(n,k-1);             % last sample matched to the first
   y += wa(k)*cos(2*pi*(k-1)*x01(n));    % for MATLAB compatibility
end

y=y.';


