{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

solved20

# solved20 - at 500 equally spaced frequencies This means...

This preview shows page 1. Sign up to view the full content.

S 20.1 (P 4.5) ______________ i) MATLAB code: b = [1 -3 1 1 -3 1].'; H = fft(b,256); A = abs(H); q = angle(H); ii) H(exp(j*w)) = 1 - 3*exp(-j*w) + exp(-j*2*w) + exp(-j*3*w) - 3exp(-j*4*w) + exp(-j*5*w) = exp(-j*5*w/2)*(exp(j*5*w/2) - 3*exp(j*3*w/2) + exp(j*w/2) + exp(-j*w/2) - 3*exp(-j*3*w/2) + exp(-j*5*w/2)) = exp(-j*5*w/2)*(2*cos(w/2) = 6*cos(3*w/2) + 2*cos(5*w/2)) iii) y[n] = H(1/2)*x[n] = H(1/2)*(1/2)^n H(1/2) = 1 - 3*2 + 2^2 + 2^3 -3*2^4 + 2^5 = -9 So y[n] = -9*(1/2)^n S 20.2 (P 4.6) ______________ The vector H (in MATLAB) is obtained by sampling sum(a[n]*exp(-j*w*n)), where n ranges from 0 to 4
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: at 500 equally spaced frequencies. This means that the coefficient vector for the filter is simply =a, i.e., [1 -3 5 -3 1].' (i) y[n] = x[n] -3*x[n-1]+ 5*x[n-2] -3*x[n-3] + x[n-4] (ii) H(z) = 1-3/z + 5/(z^2) - 3/(z^3) + 1/z^4 Thus H(1/3) = 1 - 3*3 + 5*9 - 3*27 + 81 = 37 and if the input sequence is x[n] = (1/3)^n (all n), the output sequence is y[n] = H(1/3)*(1/3)^n = 37*(1/3)^n, all n (iii) H(exp(j*w))= 1-3*exp(-j*w)+5*exp(-j*2*w)-3*exp(-j*3*w)+exp(-j*4*w) = exp(-j*2*w)*(exp(j*2*w)-3*exp(j*w)+5-3*exp(-j*w)+exp(-j*2w)) = exp(-j*2*w)*(5-6*cos(w)+2*cos(2*w))...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online