Function File: c = cconv (a, b, n)
Function File: c = cconv (a, b)

Compute the modulo-N circular convolution.

a and b are input vectors and c is the modolo-n convolution of a and b. If n is not provided, its assumed default value is length(a) + length(b) - 1, which provides the same result as a linear convolution.

Examples:

cconv (1:2, 1:4)
   ⇒  1   4   7   10   8
cconv (1:2, 1:4, 2)
   ⇒  16   14
cconv (1:2, 1:4, 4)
   ⇒  9   4   7   10

See also: conv, circshift.

Package: signal