Linear and circular convolution are fundamentally different operations.
Linear convolution of an n-point vector x, and an l-point vector y, has
length n + l - 1, and can be computed by the function conv,
which uses filter. The circular convolution, by contrast, is
equal to the inverse discrete Fourier transform (DFT) of the product of the
vectors' DFTs.
For the circular convolution of x and y to be equivalent to
their linear convolution, the vectors must be padded with zeros to length at
least n + l - 1 before taking the DFT. After inverting the product of
the DFTs, only the first n + l - 1 elements should be retained.
For long sequences circular convolution may be more efficient than linear
convolution. You can also use cconv to compute the circular
cross-correlation of two sequences.