Homework 2 (Chapters 1 & 2)
Homework 2 (Chapters 1 & 2)
−4
1
7. Compute the convolution sum y[n] = x[n] ∗ h[n] for each of the following pairs of signals.
(P 2.21 b,c p. 141)
8. Compute the convolution y(t) = x(t) ∗ h(t) for each of the following pairs of signals.
9. The following are the impulse responses of LTI systems. Determine whether each system is
causal and/or stable. Justify your answers. (P 2.28 e,g and 2.29 e,f )
Practical Assignment
1. Define the MATLAB vector nx to be the time indices −3 ≤ n ≤ 7 and the MATLAB vector x
to be the values of the signal x[n] at those samples, where x[n] is given by
2, n = 0,
1, n = 2,
x[n] = −1, n = 3,
3, n = 4,
0, otherwise
If you define these vectors correctly you should be able to plot this discrete-time sequence using
stem(nx,x). Now plot x[n − 2] and x[−n + 1].
2. Consider the impulse response h[n] = δ[n + 1] + δ[n − 1] and the input x[n] = δ[n] − 3δ[n − 2].
In MATLAB define the vectors h and x corresponding to these sequences. Use conv (read help
for conv: help conv) to compute the output signal y[n]. Determine a vector of time indices
corresponding to y and store those in the vector ny. Plot y[n] as a function of n using the
command stem(ny,y).
3. Consider the impulse response h[n] and input x[n] defined below
h[n] = u[n + 2]
x[n] = ( 35 )n−2 u[n − 2]
2
b. Define a vector h in MATLAB that contains the values of h[n] for 2 ≤ n ≤ 14, and define
a vector x in MATLAB that contains the values of x[n] for 0 ≤ n ≤ 24. Define vectors
nh and nx containing the corresponding time indices. Compute the convolution of these
two finite-length vectors using y=conv(x,h). Compute the vector of time indices for y and
store that in ny. Plot y using the stem command. Note that since the h and x vectors are
shortened versions of the true signals, only a portion of the output vector will contain the
true values of y[n]. Specify which values in the output vector y are correct and which are
not. Explain your answer.