Docsity

Write a program to perform convolution of Two input sequences., Assignments of Signal Processing and Analysis

Partial preview of the text

Download Write a program to perform convolution of Two input sequences. and more Assignments Signal Processing and Analysis in PDF only on Docsity!

RAKESH ASERY (09EC73)

OBJECT:-Write a program to perform convolution of

Two input sequences.

%Program:

x=input('Enter sequence x[n]');

h=input('Enter sequence h[n]');

y=conv(x,h);

subplot(3,1,1);

stem(x);

title('x[n]');

subplot(3,1,2);

stem(h);

title('h[n]');

subplot(3,1,3);

stem(y);

title('y[n]=x[n]*h[n]');

Enter sequence x[n] [1 2 3 1]

Enter sequence h[n] [0 1 2]

RAKESH ASERY (09EC73)

RESULT: - Thus we have successfully performed the

linear convolution.

x[n] 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3

h[n] 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6

y[n]=x[n]*h[n]