Consider a discretetime system H1 with impulse response h1 n
Solution
%a
n=-8:1:8
h1=dirac(n)+dirac(n-1)-dirac(n-2)-dirac(n-3);
subplot(1,3,1)
stem(n,h1)
xlabel(\'n\')
ylabel(\'h1(n)\')
h2=(heaviside(n+3)-heaviside(n-3)).*(1/2).^n;
subplot(1,3,2)
stem(n,h2)
xlabel(\'n\')
ylabel(\'h2(n)\')
x=(heaviside(n)-heaviside(n-6)).*(1/4).^n;
subplot(1,3,3)
stem(n,x)
xlabel(\'n\')
ylabel(\'h3(n)\')
%b
figure
vb=conv(x,h1)
subplot(2,2,1)
stem(vb)
xlabel(\'n\')
ylabel(\'Vb(n)\')
yb=conv(vb,h2)
subplot(2,2,2)
stem(yb)
xlabel(\'n\')
ylabel(\'Yb(n)\')
%c
vc=conv(x,h2)
subplot(2,2,3)
stem(vc)
xlabel(\'n\')
ylabel(\'Vc(n)\')
yc=conv(vc,h1)
subplot(2,2,4)
stem(yc)
xlabel(\'n\')
ylabel(\'Yc(n)\')
%if you observe figure 2 you can say that Vb,Vc are different but Yb and Yc
%are same because of the cascaading property i.e H1*H2=H2*H1 commutative
%H1 and H2 are commutative
![Consider a discrete-time system H_1, with impulse response h_1 [n] = delta [n] + delta[n -1] -delta[n - 2] -delta [n - 3]. a discrete-time system H_2 with impu Consider a discrete-time system H_1, with impulse response h_1 [n] = delta [n] + delta[n -1] -delta[n - 2] -delta [n - 3]. a discrete-time system H_2 with impu](/WebImages/18/consider-a-discretetime-system-h1-with-impulse-response-h1-n-1036440-1761537836-0.webp)