convolution of unit impulse |In MATLAB|

 Plot the convolution of unit impulse with itself. 𝒖[𝒏] = 𝟏, 𝟎 < 𝒏 < 𝟏 𝟎, π‘Άπ’•π’‰π’†π’“π’˜π’Šπ’”π’†

CODE:

clc;

clear all;

close all;

x=[0,0,0,1,0,0,0];

x1=[0,0,0,1,0,0,0];

t=-3:3;

l1=length(x);

l2=length(x1);

l3=l1+l2-1;

a=t:1:t+l1-1;

b=t:1:t+l2-1;

d=a+b;

c=d:1:d+l3-1;

y=conv(x,x1);

subplot(2,1,1);

stem(a,x);

xlabel('Time');

ylabel('Magnitude');

title('x[n]');

subplot(2,1,2);

stem(c,y);

xlabel('Time');

ylabel('Magnitude');

title('x[n]*x[n]');






Post a Comment

0 Comments