opConvolve One and two dimensional convolution operator.
opConvolve(M,N,KERNEL,OFFSET,MODE) creates an operator for one or
two-dimensional convolution, depending on the size of the KERNEL,
and the matrix or vector (MxN) the convolution is applied to. The
convolution is one dimensional only if KERNEL is a column vector
and N=1, or KERNEL is a row vector and M=1. The OFFSET parameter
determines the center of the KERNEL and has a default value of
[1,1]. When the OFFSET lies outside the size of the KERNEL, the
KERNEL is embedded in a zero matrix/vector with appropriate
center. For one-dimensional convolution, KERNEL may be a
scalar. Specifying an offset that is not equal to one where the
corresponding size of the kernel does equal one leads to the
construction of a two-dimensional convolution operator. There are
three types of MODE:
MODE = 'regular' - convolve input with kernel;
'truncated' - convolve input with kernel, but keep only
those MxN entries in the result that
overlap with the input;
'cyclic' - do cyclic convolution of the input with a
kernel that is wrapped around as many
times as needed.
The output of the convolution operator, like all other
operators, is in vector form.