Code covered by the BSD License  

Highlights from
Circular Convolution

image thumbnail

Circular Convolution

by

 

Calculating circular convolution of two discrete time sequences.

Circonv.m
%Program to find Circular Convolution of two sequences
%(Roll No. 233/08)
x=input('Enter first sequence')
h=input('Enter second sequence')
if (length(h)<length(x))
    c=length(x)-length(h)
    h=[h,zeros(1,c)]
elseif (length(x)<length(h))
    c=length(h)-length(x)
    x=[x,zeros(1,c)]
else
    disp('lengths are equal')
end
X=fft(x)
H=fft(h)
Y=X.*H
Circular_Convolution=ifft(Y) 

Contact us