Solution to HW 2 Problem 1 1.1) Since [] 0, 0, [1] 6, [2] 4, [3] 0, [4] 8, and [ ] 5. 0, yk k y y y y yk k The Z-transform of the sequence [] yk is obtained as 1 2 4 () { [ ]} 0 6 4 0 8 z Yz yk z z 1 2 4 4 8 . 6 z z z When the input is a unit-pulse sequence, its Z-transform is () 1 ] . {[ } Uz k Therefore, the system transfer function is 1 2 4 1 2 4 () 4 8 4 8 . ( 6 1 6 ) Yz z z z z U z z z 1.2) We get from the answer of 1.1) that 1 2 4 () 4 8 () 6 . Yz z z Uz z By taking inverse Z-transform to each term in the equation above and using the time-shifting property, the following difference equation relating [] uk and [] yk is obtained: [] 6[ 1] 4[ 2] 8[ 4]. yk uk uk uk 1.3) Based on the difference equation in 1.2), the output [ ], 1, 2, 3, 4 yk k generated from the input [0] 1.5, [1] 2, [2] 1, [3] 2.5, [4 ,[] 0, 0 ] 0.5, uk k u u u u u can be calculated as [1] 6 [0] 4[1] 8 [ 3] 9, [2] 6 [1] 4 [0] 8 [ 2] 18 y u u u y u u u [3] 6 [2] 4 [1] 8[1] 2, [4] 6 [3] 4 [2] 8 [0] 1. y u u u y u u u The output samples above can also be calculated using the MATLAB code below: >> B=[0 6 4 0 -8]; >> A=[1]; >> u=[1.5 2 -1 2.5 -0.5]; >> y=filter(B,A,u) y = 0 9 18 2 -1