02.10.2019 Views

UploadFile_6417

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Problems 57<br />

2. x(n) ={1, 1, 0, 1, 1}, h(n) ={1, −2, −3, 4}<br />

↑<br />

↑<br />

3. x(n) =(1/4) −n [u(n +1)− u(n − 4)], h(n) =u(n) − u(n − 5)<br />

4. x(n) =n/4[u(n) − u(n − 6)], h(n) =2[u(n +2)− u(n − 3)]<br />

P2.16 Let x(n) =(0.8) n u(n), h(n) =(−0.9) n u(n), and y(n) =h(n) ∗ x(n). Use 3 columns and 1<br />

row of subplots for the following parts.<br />

1. Determine y(n) analytically. Plot first 51 samples of y(n) using the stem function.<br />

2. Truncate x(n) and h(n) to26samples. Use conv function to compute y(n). Plot y(n)<br />

using the stem function. Compare your results with those of part 1.<br />

3. Using the filter function, determine the first 51 samples of x(n) ∗ h(n). Plot y(n) using<br />

the stem function. Compare your results with those of parts 1 and 2.<br />

P2.17 When the sequences x(n) and h(n) are of finite duration N x and N h , respectively, then<br />

their linear convolution (2.13) can also be implemented using matrix-vector multiplication.<br />

If elements of y(n) and x(n) are arranged in column vectors x and y respectively, then from<br />

(2.13) we obtain<br />

y = Hx<br />

where linear shifts in h(n − k) for n =0,...,N h − 1 are arranged as rows in the matrix H.<br />

This matrix has an interesting structure and is called a Toeplitz matrix. To investigate this<br />

matrix, consider the sequences<br />

x(n) ={1, 2, 3, 4, 5} and h(n) ={6, 7, 8, 9}<br />

↑<br />

↑<br />

1. Determine the linear convolution y(n) =h(n) ∗ x(n).<br />

2. Express x(n) asa5× 1 column vector x and y(n) asa8× 1 column vector y. Now<br />

determine the 8 × 5 matrix H so that y = Hx.<br />

3. Characterize the matrix H. From this characterization can you give a definition of a<br />

Toeplitz matrix? How does this definition compare with that of time invariance?<br />

4. What can you say about the first column and the first row of H?<br />

P2.18 MATLAB provides a function called toeplitz to generate a Toeplitz matrix, given the first<br />

row and the first column.<br />

1. Using this function and your answer to Problem P2.17, part 4, develop another MATLAB<br />

function to implement linear convolution. The format of the function should be<br />

function [y,H]=conv_tp(h,x)<br />

% Linear Convolution using Toeplitz Matrix<br />

% ----------------------------------------<br />

% [y,H] = conv_tp(h,x)<br />

% y = output sequence in column vector form<br />

% H = Toeplitz matrix corresponding to sequence h so that y = Hx<br />

% h = Impulse response sequence in column vector form<br />

% x = input sequence in column vector form<br />

2. Verify your function on the sequences given in Problem P2.17.<br />

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).<br />

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!