PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

Time Domain Representation of Continuous and Discrete Signals 47


R.1.144 MATLAB offers the user a number of built-in window functions in the signal pro-
cessing toolbox. Some of the window models most often used are known by the
following names:
a. Rectangular
b. Triangular
c. Hanning
d. Hamming
e. Kaiser
f. Chebyshev
g. Bartlett
h. Blackman
R.1.145 The MATLAB function Hamming(N) returns a vector with N-weighted points
referred to as the Hamming window.
R.1.146 Similarly, the MATLAB commands
Hanning(N)
Blackman(N)
return N-length vectors representing the Hanning or Blackman weighted-type
windows.
R.1.147 The three window models: Hamming, Hanning, and Blackman are based on
cosine functions. The mathematical equations used to generate the above window
sequences are defi ned as follows:
a. For the Hamming window,

w(n) = 0.54 + 0.46 cos( (^) n/M)
b. For the Hanning (Van Hann) window,
w(n) = 0.54 + 0.46 cos(( (^)
n)/(M + 1))
c. For the Blackman window,
w(n) = 0.5 + 0.46 cos(( (^) n)/M) + 0.08 cos((4  (^) * n)/(2n + 1))
where M = 1/2(L − 1) is an integer representing the midpoint and L is the
window’s length.
R.1.148 The MATLAB command Kaiser (N, β) returns the N points of the Kaiser window,
where β is a constant, with the following range 1 ≤ β ≤ 10 , where β represents a
tradeoff between the side lobe height and its width. The Kaiser window is based
on the modifi ed Bessel function Io(x) given as follows:
wn
InMM
I
o nL
O


()


()/


()


,, , ( )








1


012 1


^2


for ... −

where M = 1/2(L − 1) is the midpoint and the weight β is over the range 0 ≤ β ≤ 10.
This window is frequently used in the design of fi lters, where β controls the
stop- and pass-band ripples.
R.1.149 The MATLAB function triang(N) returns the N-point triangular window based on
the following equation:

wn
n
M

() 1


1







Free download pdf