48
Practical MATLAB
® Applications for Engineers
R.1.150 The MATLAB function boxcar(N) returns the N points of a rectangular window
defi ned by
w n
n
M
n
M
( )
| |
| |
ϭ
1
0
Ͻ
Ͼ



R.1.151 The MATLAB function Bartlett(N) returns the N points of the Bartlett window
based on the equation
w n
M n
M
( ) ϭ
Ϫ
R.1.152 There are other popular window models such as Parabolic, Cauchy, and Gaussian
defi ned below. The Parabolic or Parzen window is based on the equation given by
w n
n M
M
( ) ϭ 1
2
Ϫ
Ϫ

 

 
R.1.153 The Cauchy window is defi ned by the equation given by
w n
M
M
n M
( )
(
)
ϭ
ϩ
2
2
2
2
Ϫ
where α is an optional control character.
R.1.154 The Gaussian window is defi ned by the following equation:
w n
n M
M
( ) exp
ϭ
Ϫ
Ϫ
1
2
2
2

 

 








where α is an optional control character.
R.1.155 All the proposed window models share the characteristic that the peak occurs in
the middle (midpoint) of the window sequence, whereas at its edges (end points)
the behavior tends to be smooth.
The behavior of some of the window models may present side lobes or undesirable shapes over some regions. In any case, an attempt is made to present only the
most important and the widely accepted window models without exploring their
behaviors.
R.1.156 For example, create the script fi le windows that returns the plots of the following
windows:
a. Hamming
b. Hanning
c. Blackman
shown in Figure 1.39, using N = 31.
MATLAB Solution
>> n = -15:1:15;
>> WHAM = Hamming(31);
>> WHAN = Hanning(31);
>> WBLAC = Blackman(31);
CRC_47760_CH001.indd 48
CRC_47760_CH001.indd 48
7/25/2008 4:16:19 PM
7/25/2008 4:16:19 PM
Précédent

- 59/708

Suivant