You are on page 1of 2

EXPERIMENT :- 07

TITLE :- Study of Circular Convolution using Matrix


Method.

THEORY :- Circular convolution, also known as cyclic


convolution, is a special case of periodic convolution, which is
the convolution of two periodic functions that have the same
period. Periodic convolution arises, for example, in the context
of the discrete-time Fourier transform.
If y(n) is the output of circular convolution and x(n) & h(n) are
2 given signals then the circular convolution is expressed as

y(n) = x(n) h(n)

QUESTION :- Find out the output y(n) of circular


convolution using matrix method where x(n) = {1,3,2,4,6} &
h(n) = {3,3,2,1}?

MATLAB CODE :-
clc
clear all
close all
n=0:7
x=[1 3 2 4 6]
h=[3 3 2 1]
N=length(x)
M=length(h)
L=N+M-1
p=find(n>4)
x(p)=0
q=find(n>3)
h(q)=0
x1(:,1)=[3;3;2;1;0]
x2=[3;3;2;1;0]
for i=1:N-1
x1(:,i+1)=circshift(x2,[1 0])
x2=x1(:,i+1)
end
y=x1*x'
subplot(3,1,1)
stem(n,x,'^','r','LineWidth',3)
title({'\fontsize{20}{\color{blue}Circular Convolution Using
Matrix Method}';'\fontsize{15}{\color{green}x(n)}'})
xlabel('time-->')
ylabel('Amplitude--->')
grid on
subplot(3,1,2)
stem(n,h,'^','c','LineWidth',3)
title({'\fontsize{15}{\color{red}h(n)}'})
xlabel('time-->')
ylabel('Amplitude--->')
grid on
subplot(3,1,3)
stem(n,y,'^','m','LineWidth',3)
title({'\fontsize{15}{\color{blue}y(n)}'})
xlabel('time-->')
ylabel('Amplitude--->')
grid on

OUTPUT :-

You might also like