98
Practical MATLAB
® Applications for Engineers
be the transfer function of a discrete system. Write a MATLAB program that returns
a. The impulse as well as the step response
b. The zero/pole diagram
c. The system output if its input is given by
x(n) = 0.6
n cos((2 * pi * n)/(256)), for n = 0, 1, 2, 3, …, 256
d. The plot of the output if the input x(n) given in part c is truncated by a triangular
window with size of N = 128
e. Repeat part d for the Hamming, Hanning, and Blackman windows
P.1.33 Write a program (or programs) that returns the sequences and plots shown in Figure 1.80.
P.1.34 The Parabolic or Parzen window is defi ned by the following equation:
w n
n M
M
( ) ϭ Ϫ
Ϫ
1
2
{ }
Write a program that returns the plots of w(n) versus n, for n = 31 and M = 0.5, 1,
and 5, and discuss the effect of M.
y1(x)
y3 (x)
y5 (x)
y6(x)
y4 (x)
y2(x)
2
−10
−1
−2
−1
−4
−3
−1
1
2
3
1 0
−2
1
1
2
2
2
4
2
0
2
1
3
0
0
0
0
0
10
2
4
1
1 0
−10
−1
1
1
2
3
10
x
x
x
x
x
1
1
x
FIGURE 1.80
Plots of P.1.33.
CRC_47760_CH001.indd 98
CRC_47760_CH001.indd 98
7/25/2008 4:16:31 PM
7/25/2008 4:16:31 PM
Practical MATLAB
® Applications for Engineers
be the transfer function of a discrete system. Write a MATLAB program that returns
a. The impulse as well as the step response
b. The zero/pole diagram
c. The system output if its input is given by
x(n) = 0.6
n cos((2 * pi * n)/(256)), for n = 0, 1, 2, 3, …, 256
d. The plot of the output if the input x(n) given in part c is truncated by a triangular
window with size of N = 128
e. Repeat part d for the Hamming, Hanning, and Blackman windows
P.1.33 Write a program (or programs) that returns the sequences and plots shown in Figure 1.80.
P.1.34 The Parabolic or Parzen window is defi ned by the following equation:
w n
n M
M
( ) ϭ Ϫ
Ϫ
1
2
{ }
Write a program that returns the plots of w(n) versus n, for n = 31 and M = 0.5, 1,
and 5, and discuss the effect of M.
y1(x)
y3 (x)
y5 (x)
y6(x)
y4 (x)
y2(x)
2
−10
−1
−2
−1
−4
−3
−1
1
2
3
1 0
−2
1
1
2
2
2
4
2
0
2
1
3
0
0
0
0
0
10
2
4
1
1 0
−10
−1
1
1
2
3
10
x
x
x
x
x
1
1
x
FIGURE 1.80
Plots of P.1.33.
CRC_47760_CH001.indd 98
CRC_47760_CH001.indd 98
7/25/2008 4:16:31 PM
7/25/2008 4:16:31 PM
