The Convolver computes the convolution of
two inputs.

To compute the convolution of two inputs:

Define and set up your convolver. See Construction.

Call step to compute the convolution
according to the properties of dsp.Convolver. The
behavior of step is specific to each object in the
toolbox.

Construction

H = dsp.Convolver returns
a convolver object, H, that convolves two inputs.
For N-D arrays, the convolver computes the convolution column-wise.
For arrays, the inputs must have an equal number of columns. If one
input is a vector and the other is an N-D array, the convolver computes
the convolution of the vector with each column of the N-D array. Convolving
inputs of length N and M results
in a sequence of length N+M–1.
Convolving matrices of size M-by-N and P-by-N results
in a matrix of size (M+P–1)-by-N.

H = dsp.Convolver('PropertyName',PropertyValue,
...) returns a convolver object, H, with
each property set to the specified value.

Properties

Method

Domain for computing convolutions

Specify the domain in which the convolver performs the convolutions
as Time Domain, Frequency Domain, or Fastest.
Computing convolutions in the time domain minimizes memory use. Computing
convolutions in the frequency domain may require fewer computations
depending on the input length. If the value of this property is Fastest, the object computes convolutions
in the domain which minimizes the number of computations. The default
is Time Domain.

Full precision override for fixed-point arithmetic

Specify whether to use full precision rules. If you set FullPrecisionOverride to true,
which is the default, the object computes all internal arithmetic
and output data types using full precision rules. These rules provide
the most accurate fixed-point numerics. It also turns off the display
of other fixed-point properties because they do not apply individually.
These rules guarantee that no quantization occurs within the object.
Bits are added, as needed, to ensure that no roundoff or overflow
occurs. If you set FullPrecisionOverride to false,
fixed-point data types are controlled through individual fixed-point
property settings. For more information, see Full Precision for Fixed-Point System Objects.

RoundingMethod

Rounding method for fixed-point operations

Specify the rounding method as Ceiling, Convergent, Floor, Nearest, Round, Simplest,
or Zero. The default is Floor. This property applies only if the
object is not in full precision mode.

OverflowAction

Overflow action for fixed-point operations

Specify the overflow action as Wrap or Saturate. The default is Wrap. This property applies only if the
object is not in full precision mode.

ProductDataType

Product word and fraction lengths

Specify the product fixed-point data type as Full precision, Same
as first input, or Custom.
The default is Full precision.

CustomProductDataType

Product word and fraction lengths

Specify the product fixed-point type as a scaled numerictype object with a Signedness of Auto.
This property applies only when the ProductDataType property
is Custom. The default is numerictype([],32,30).

AccumulatorDataType

Accumulator word and fraction lengths

Specify the accumulator fixed-point data type as Full precision, Same
as product, Same as first input,
or Custom. The default is Full precision.

CustomAccumulatorDataType

Accumulator word and fraction lengths

Specify the accumulator fixed-point type as a scaled numerictype object with a Signedness of Auto.
This property applies only when the AccumulatorDataType property
is Custom. The default is numerictype([],32,30).

OutputDataType

Output word and fraction lengths

Specify the output fixed-point data type as Same as accumulator, Same
as product, Same as first input,
or Custom. The default is Same as accumulator.

CustomOutputDataType

Output word and fraction lengths

Specify the output fixed-point type as a scaled numerictype object with a Signedness of Auto.
This property applies only when the OutputDataType property
is Custom. The default is numerictype([],16,15).

hconv = dsp.Convolver;
x = ones(10,1);
y = step(hconv, x, x);
% Result is a triangular sequence
plot(y);

Algorithms

This object implements the algorithm, inputs, and outputs described
on the Convolution block
reference page. The object properties correspond to the block parameters.