Digital Signal Processing Reference
In-Depth Information
10. Let the sequence
y
[
n
]
= [1,2,3,4,5,6] with indices [2:1:7]. Graph the following sequences over
the range
n
=-10:1:10.
(a)
y
[
n
−
1
]
(b)
y
[
n
+
2
]
[
−
]
(c)
y
1
n
(d)
y
]
11. Decompose
[−
3
−
n
16
)/
16
)
into even and odd components having the same length as
y
.
12. Decompose
y
=
cos
(
2
π(
0
:
1
:
y
=
cos
(
2
π(
0
:
1
:
16
)/
16
)
into even and odd components that are symmetrical about
n
= 0 (note that for
y
itself, the first sample is
at
n
= 0).
13. Write a script that can generate Fig. 2.9 when called with the following statement, where
the first argument is the sequence
y
[
n
]
and the second argument is the corresponding vector of sample
indices.
LVxEvenOddAboutZero([0.9.ˆ([0:1:30])],[0:1:30])
Your script should be general enough to process a call such as
LVxEvenOddAboutZero([0.8.ˆ([4:1:30])],[-4:1:30])
14. Compute the sum of the geometric sequence 0.95
n
for
n
=10to
.
15. Compute and display a signal consisting of a chirp added to noise having normal (Gaussian)
distribution. The sequence should be 1024 samples long, the chirp should start at time 0.0 second and
frequency 0 Hz and end at time 2.0 second at frequency 10 Hz. The noise should have a standard deviation
of 1.0. Perform again for noise with standard deviations of 0.125, 0.25, 0.5, 1.0, and 2.0.
16. Write the m-code for the script
∞
LV xLinearab(a, b, f
1
,f
2
,N,Del,LTICoeff)
as described in the text, producing the plots shown and described in Fig. 2.18, and conforming to the
following function definition:
function LVxLinearab(a,b,f1,f2,N,Del,LTICoeff )
% Demonstrates the principle of superposition, i.e.,
% LTI(ax1 + bx2) = aLTI(x1) + bLTI(x2) where LTI is a
% linear time invariant operator defined by LTICoeff, the
% coefficients of c[n] which weight an input sequence and delayed
% versions thereof, i.e., y = LTI(x) = c[0]x[n] + c[1]x[n-1] + ..
% a and b are constants, and f1 and f2 are frequencies of cosine waves
% that are used as x1 and x2
% N is the length of the test sequences x1 and x2, and Del is a number of