File Exchange

image thumbnail


version 1.0 (2.05 KB) by

C = CIRCONV(A,B,N) performs the N-point circular convolution of vectors A and B

12 Ratings



No License

CIRCONV N-point circular convolution

C = CIRCONV(A,B,N) performs the N-point circular convolution of vectors A and B. C is returned as a row vector. A and B must be vectors, but may be of different lengths. N must be a positive, non-zero integer. The results of CIRCONV will match that of CONV if N>=( length(A) + length(B) - 1). This is also the alias-free criterion for the circular convolution.

See also CONV

Comments and Ratings (15)


how can this related to the 3D sound ??

There is a much cleaner more intuitive implementation located at:

desi agarwal

it says i have to use vectors only

Z = [ 2 -1 0 -3; -3 2 -1 0; 0 -3 2 -1; -1 0 -3 2]
B = [ 1 -3-2*i 4 -3+2*i].' with N =4

it doesnt work?

Piyush Tarey

helped lab..hehe

Pradeep Purohit

Ory Eger

Works perfectly! Very useful.

a singer

you can do this directly using:
in exactly one line.

saurabh jain

Thanx man

mohd rafi ramli

that is good

luis farinha

Very impoortante for me this script.

Anand Rangarajan

It is handy.

prabin gautam

very needed one

Milos Komarcevic

A very handy function, but I believe the ctranspose ' needs to be changed to transpose .' throughout, otherwise you don't get what you expect when convolving complex vectors.

tom tom

Good job
Wont have to do my homework :)

Andrew Singer

Why not just multiple the DFT's of the time-aliased signals? It would be MUCH faster...

function xo = talias(x,N)
%% function xo=talias(x,N)
%% time alias data vector x to length N for an N-point DFT.
x=[x(:)' zeros(1,N*nrows-l)];
xo = sum( reshape(x,N,nrows)' );

then Y = ifft(fft(talias(a,n)).*fft(talias(b,n)))

MATLAB Release
MATLAB 5.3 (R11)

Inspired: Circular Convolution

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today