home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 5
/
ctrom5b.zip
/
ctrom5b
/
WINDOWS
/
DIVERSEN
/
MATHS171
/
BLACKMAN.M
< prev
next >
Wrap
Text File
|
1993-03-23
|
522b
|
24 lines
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.';