Title Applied Digital Signal Processing Authors Manolakis IS
Title: Applied Digital Signal Processing
Author(s): Manolakis
ISBN: 9780521110020
>> You can readily find a free PDF download by Googling it.
Chapter: 4
Problem: 12
Parts: (a),(b)
>> Simply make use of a DTFT table as the basis of the solution.
Solution
n = C-5:51; >> x = 2*impseq(-2,-5.5) - impseq(4,-5,5) ; >> stem(n,x); title(\'8equence in Problem 2.1aJ) >> xlabel(\'nJ) ; ylabel(\'x(n) \')
d. i(n)={ ..., 5,4,3,2,1,5,4,3,2,1,5,4,3,2,1,... ); -10> n = [O:201; >> xi = n.*(stepseq(0,0,20)-stepseq(lO.O,20)); >> x2 = 10*eq(-0.3*(n-10)) .*(stepseq(i0,0,20)-step~e~(20.0.20)) ; >> X = x1+x2; >> subplot (2,2,3); stem(n,x) ; title(\'Sequence in Problem 2. ib\') >> xlabel(\'nJ) ; ylabel(\'x(n) \') ; >> n = C-10:91; X = C5,4,3,2,11; >> xtilde = X\' * ones(1,4); >> xtilde = (xtilde(:))\'; >> subplot (2,2,4) ; stem(n,xtilde) ; title(\'Sequence in Problem 2. ld\') >> xlabel(\'nl) ; ylabel(\'xtilde(n) \') ;
he first part is obtained by shifting X (n) by 5 and the second part by shifting z (n) by -4. This shifting and the addition can he easily done using the sigshif t and the sigadd functions. Sequence in Example 2.la 3- Sequence in Example 2.1 b >> [xli,nli] = sigshift(x,n,5) ; [xi2.n121 = sigshift(x,n,-4) ; >> [xl,nl] = sigadd(2*xli,nli,-3*xiZ,n12); >> subplot(2, 1, I) ; stem(n1 ,xi) ; title(\'Sequence in Example 2.2~1\') >> xlabel(\'nJ) ; ylabel(\'xi(n) \'1 ; The plot of xl (n) is shown in Figure 2.2a. b. x2(n)=x(3-n)+ x(n)s(n-2). The first term can be written as X (- (n - 3)). Hence it is obtained by first folding X (n) and then shifting the result by 3. The second part is a multiplication of X (n) and X (n - 2), both of which have the same length but different support (or sample positions). These operations can be easily done using the sigfold and the sigmult functions
