9.4 One-Sided Z-Transform 531− 2 0 2
nx[n]
h
[n
]y[n]nn4 6(a) (b)(c)800.51− 2 0 2 4 6 800.51− 2 0 2 4 6 800.511.5FIGURE 9.5
Convolution sum for an averager FIR: (a)x[n], (b)h[n], and (c)y[n]. The outputy[n]is of length 6 given thatx[n]
is of length 4 andh[n]is the impulse response of a second-order FIR filter of length 3.
and according to the convolution sum property,Y(z)=X(z)H(z)=1
2
( 1 + 2 z−^1 + 3 z−^2 + 3 z−^3 + 2 z−^4 +z−^5 )Thus,y[0]=0.5,y[1]=1,y[2]=1.5,y[3]=1.5,y[4]=1, andy[5]=0.5, just as before.
In MATLAB the functionconvis used to compute the convolution sum giving the results shown
in Figure 9.5, which coincide with the ones obtained in the other approaches. nnExample 9.8
Consider an FIR filter with impulse responseh[n]=δ[n]+δ[n−1]+δ[n−2]Find the filter output for an inputx[n]=cos( 2 πn/ 3 )(u[n]−u[n−14]). Use the convolution sum
to find the output, and verify your results with MATLAB.