0% found this document useful (0 votes)
77 views3 pages

Remarks: - : Done by

This document contains the code for a program to calculate circular convolution using linear convolution. The program takes two sequences as input, performs linear convolution on the sequences by multiplying and summing corresponding elements, then adds matching elements to obtain the circular convolution output. The output was verified through manual calculation.

Uploaded by

Someraj Bose
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views3 pages

Remarks: - : Done by

This document contains the code for a program to calculate circular convolution using linear convolution. The program takes two sequences as input, performs linear convolution on the sequences by multiplying and summing corresponding elements, then adds matching elements to obtain the circular convolution output. The output was verified through manual calculation.

Uploaded by

Someraj Bose
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

DONE BY: NAME: SOMERAJ BOSE ROLL : 43 SEC :B YEAR : 3RD REMARKS : _____________________

SIGNATURE : ____________________

INSTITUTE OF ENGINEERING AND MANAGEMENT

Page |1

TITLE: Program to find out the Circular convolution using Linear convolution
of two sequences.

CODE:
FUNCTION:
function y1=c_cnv(x,h) lx=length(x); lh=length(h); a=lx+lh-1; h1=[h zeros(1,a-lh)]; x1=[x zeros(1,a-lx)]; for i=1:a y(i)=0; for k=1:i y(i)=y(i)+x1(k)*h1(i-k+1); end end b=length(y); c=max(lx,lh); y=[y zeros(1,2*c-b)]; for i=1:c y1(i)=y(i)+y(c+i); end end

PROGRAM:
clc clear all close all x=input('enter x: '); h=input('enter h: '); y=c_cnv(x,h) subplot(3,1,1) stem(x) title('x(n)') subplot(3,1,2) stem(h) title('h(n)')
NAME: SOMERAJ BOSE SEC: ECE-B YEAR: 3RD ROLL: 43

INSTITUTE OF ENGINEERING AND MANAGEMENT

Page |2

subplot(3,1,3) stem(y) title('circular convolution')

OUTPUT:
enter x: [1 2 3 4] enter h: [1 1 2 2] y= 15 17 15 13

DISCUSSION:
We have implemented the circular convolution using linear convolution by adding up the values of the result of the linear convolution of the two given sequences as needed using for loop. The minor errors in the programs were corrected. The output is checked by manual calculation.
NAME: SOMERAJ BOSE SEC: ECE-B YEAR: 3RD ROLL: 43

You might also like