discrete 1-D convolution.
C = conv(A,B [,shape])
a real or complex vector.
a real or complex vector.
an optional character string with possible values:
"full"
, conv
computes the full convolution. It is the
default value."same"
, conv
computes the central part of the convolution of the same
size as A
."valid"
, conv
computes the convolution parts without the zero-padding
of A
.a real or complex vector.
conv
uses a straightforward formal
implementation of the one-dimensional convolution equation in
spatial form.
C=conv(A,B [,shape])
computes the
one-dimensional convolution of the vectors A
and B
:
shape=="full"
the
dimensions of the resultC
are given by
size(A,'*')+size(B,'*')+1
. The indices of the
center element of B
are defined as
floor((size(B,'*')+1)/2)
.shape=="same"
the
dimensions of the resultC
are given by
size(A)
. The indices of the
center element of B
are defined as
floor((size(B,'*')+1)/2)
.shape=="valid"
the dimensions
of the result C
are given by
size(A,'*')-size(B,'*')+1)
if
and(size(A,'*')-size(B,'*'))>=0
else
C
is empty . The indices of the center
element of B
are defined as
1
.Note that convol can be more efficient for large arrays.
The conv function is based on the conv2 builtin.
Version | Description |
5.4.0 | Function conv introduced. |