0% found this document useful (0 votes)
48 views

Experiment No. 6: % Program For Convolution

This document describes a MATLAB experiment to calculate the convolution of two sequences using the built-in convolution function. The program prompts the user to input two sequences, calculates their convolution using the Conv function, and plots the output convolution alongside the two original sequences. The experiment demonstrates implementing linear convolution of discrete sequences in MATLAB.

Uploaded by

Parveen Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Experiment No. 6: % Program For Convolution

This document describes a MATLAB experiment to calculate the convolution of two sequences using the built-in convolution function. The program prompts the user to input two sequences, calculates their convolution using the Conv function, and plots the output convolution alongside the two original sequences. The experiment demonstrates implementing linear convolution of discrete sequences in MATLAB.

Uploaded by

Parveen Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Date: Roll No:1810636

19

Experiment No. 6

Aim: Write a program to find the convolution of two sequences using inbuilt convolution
function.

Objective: Plot an output signal for convolution function of two sequences on a single window.

System Requirement: PC having MATLAB 7.0.4.365 software.

Theory: The linear convolution of two sequencesx(n) and h(n) with length n1 and n2
respectively will give a sequence with a length of
N=N1+N2-1
When x(n) and h(n) have a duration less than N for implementing the linear convolution using
circular convolution N2-1 and N1-1 zeros are added at the end of x(n) and h(n) respectively to
increase the length to N.

Program:

clc;
% Program for Convolution
x1=input('enter 1st sequence');
x2=input('enter 2nd sequence');
c1=Conv(x1,x2);
subplot(1,3,1);
stem(x1);
xlabel('n');
ylabel('Amplitude');
title('1st input sequence(1810606)');
subplot(1,3,2);
stem(x2);
xlabel('n');
ylabel('Amplitude');
title('2nd input sequence(1810606)');
subplot(1,3,3);
stem(c1);
xlabel('n');
ylabel('Amplitude');
title('Convolution of two input sequences(1810606)');









Date: Roll No:1810636

20

Output Graph:

Result: Implementation of convolution of two sequences using inbuilt convolution function has
been done.

Conclusion: convolution of two sequences using inbuilt convolution function using MATLAB
software has been done.

You might also like