Prove all Convolution Properties with the following, (Use x[n] and h1[n] for Commutative property) 𝒙[𝒏] = { 𝟏, 𝒏 = 𝟎 𝟐, 𝒏 = 𝟏 𝟑, 𝒏 = 𝟐 𝟒, 𝒏 = 𝟑 𝟎, 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆} 𝒉𝟏 [𝒏] = { 𝟏, 𝟎 ≤ 𝒏 ≤ 𝟐 𝟎, 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆} 𝒉𝟐 [𝒏] = { 𝟏, 𝟎 ≤ 𝒏 ≤ 𝟏 𝟐, 𝒏 = 𝟐 𝟑, 𝒏 = 𝟑 𝟎, 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆}
COMMUTATIVE PROPERTY For x[n] &h1:
x=[1 2 3 4 0 0 ]; % Here x is 0 to 5
h1=[1 1 1 0 0 0];% 0<=n<=2 is 1 for other 0 to 5
%Commutative property: x[n]*h1[n]=h1[n]*x[n]
%L.H.S=x[n]*h1[n];
y=conv(x,h1);
subplot(3,2,1)
stem(x)
xlabel('Time');
ylabel('Amplitude');
title('Task1 COMMUTATIVE PROPERTY
x[n]');
subplot(3,2,3)
stem(h1)
xlabel('Time');
ylabel('Amplitude');
title('h1[n]');
subplot(3,2,5)
stem(y);
ylabel('Amplitude');
xlabel('Time');
title('L.H.S x[n]*h1[n]');
%R.H.S=h1[n]*x[n]
y2=conv(h1,x);
subplot(3,2,2)
stem(x)
xlabel('Time');
ylabel('Amplitude');
title('Task1 COMMUTATIVE PROPERTY
x[n]');
subplot(3,2,4)
stem(h1)
xlabel('Time');
ylabel('Amplitude');
title('h1[n]');
subplot(3,2,6)
stem(y2);
ylabel('Amplitude');
xlabel('Time');
title('R.H.S h1[n]*x[n]');
Result:
x[n] *h1[n]= h1[n]*x[n]
______________________________________________________________________________
COMMUTATIVE PROPERTY
For x[n] &h2:
x=[1 2 3 4 0 0]; % Here x is 0 to 5
h2=[1 1 2 3 0 0];% 0<=n<=1 is 1 for other 0 to 5
%commutative property: x[n]*h1[n]=h1[n]*x[n]
%L.H.S=x[n]*h1[n];
y=conv(x,h2);
subplot(3,2,1)
stem(x)
xlabel('Time');
ylabel('Amplitude');
title('Task1ab COMMUTATIVE PROPERTY
x[n]');
subplot(3,2,3)
stem(h2)
xlabel('Time');
ylabel('Amplitude');
title('h2[n]');
subplot(3,2,5)
stem(y);
ylabel('Amplitude');
xlabel('Time');
title('L.H.S x[n]*h2[n]');
%R.H.S=h1[n]*x[n]
y2=conv(h2,x);
subplot(3,2,2)
stem(x)
xlabel('Time');
ylabel('Amplitude');
title('Task1ab COMMUTATIVE PROPERTY x[n]');
subplot(3,2,4)
stem(h2)
xlabel('Time');
ylabel('Amplitude');
title('h2[n]');
subplot(3,2,6)
stem(y2);
ylabel('Amplitude');
xlabel('Time');
title('R.H.S h2[n]*x[n]');
Result:
x[n] *h2[n]= h2[n]*x[n]
Associative Property
x=[1 2 3 4 0 0 ]; % I use Here x is 0 to 5
h1=[1 1 1 0 0 0];% 0<=n<=2
is 1 for other 0 to 5
h2=[1 1 2 3 0 0];% 0<=n<=1 is 1 for other 0 to 5
%ASSOCIATIVE PROPERTY:
x[n]*(h1[n]*h2[n])=(x[n]*(h1[n])*h2[n]
%L.H.S=x[n]*(h1[n]*h2[n])
y1=conv(h1,h2);
y2=conv(x,y1);
subplot(4,2,1)
stem(x)
xlabel('Time');
ylabel('Amplitude');
title('Task1 ASSOCIATIVE PROPERTY
x[n]');
subplot(4,2,3)
stem(h1)
xlabel('Time');
ylabel('Amplitude');
title('h1[n]');
subplot(4,2,5)
stem(h2);
xlabel('Time');
ylabel('Amplitude');
title('h2[n]');
subplot(4,2,7)
stem(y2)
ylabel('Amplitude');
xlabel('Time');
title('L.H.S x[n]*(h1[n]*h2[n])');
%R.H.S=(x[n]*(h1[n])*h2[n]
y3=conv(x,h1);
y4=conv(y3,h2);
subplot(4,2,2)
stem(x)
xlabel('Time');
ylabel('Amplitude');
title('Task1 ASSOCIATIVE PROPERTY
x[n]');
subplot(4,2,4)
stem(h1)
xlabel('Time');
ylabel('Amplitude');
title('h1[n]');
subplot(4,2,6)
stem(h2);
xlabel('Time');
ylabel('Amplitude');
title('h2[n]');
subplot(4,2,8)
stem(y4)
ylabel('Amplitude');
xlabel('Time');
title('R.H.S (x[n]*h1[n])*h2[n]');
Result:
DISTRIBUTIVE PROPERTY:
x=[1 2 3 4 0 0 ]; % Here x is 0 to 5
h1=[1 1 1 0 0 0];% 0<=n<=2 is 1 for other 0 to 5
h2=[1 1 2 3 0 0];% 0<=n<=1 is 1 for other 0 to 5
% DISTRIBUTIVE PROPERTY: x[n]*(h1[n]+h2[n])=x[n]*h1[n]+x[n]*h2[n])
%L.H.S=x[n]*(h1[n]+h2[n])
y1=h1+h2;
y2=conv(x,y1);
subplot(4,2,1)
stem(x)
xlabel('Time');
ylabel('Amplitude');
title('Task1 DISTRIBUTIVE PROPERTY
x[n]');
subplot(4,2,3)
stem(h1)
xlabel('Time');
ylabel('Amplitude');
title('h1[n]');
subplot(4,2,5)
stem(h2);
xlabel('Time');
ylabel('Amplitude');
title('h2[n]');
subplot(4,2,7)
stem(y2)
ylabel('Amplitude');
xlabel('Time');
title('L.H.S x[n]*(h1[n]+h2[n])');
%R.H.S=x[n]*h1[n]+x[n]*h2[n])
y3=conv(x,h1);
y4=conv(x,h2);
y5=y3+y4;
subplot(4,2,2)
stem(x)
xlabel('Time');
ylabel('Amplitude');
title('Task1 DISTRIBUTIVE
PROPERTY x[n]');
subplot(4,2,4)
stem(h1)
xlabel('Time');
ylabel('Amplitude');
title('h1[n]');
subplot(4,2,6)
stem(h2);
xlabel('Time');
ylabel('Amplitude');
title('h2[n]');
subplot(4,2,8)
stem(y5)
ylabel('Amplitude');
xlabel('Time');
title('R.H.S (x[n]*h1[n])+(x[n]*h2[n])');
Result:
𝑥[𝑛] ∗ (ℎ1 [𝑛] + ℎ2 [𝑛]) = 𝑥[𝑛] ∗ ℎ1 [𝑛] + 𝑥[𝑛] ∗ ℎ2 [𝑛]
0 Comments