Product

Purpose

Multiply and divide input signals

Library

Control / Math

Description

../../_images/product.svg

The Product block multiplies or divides input signals, which may be scalars or vectors of the same size.

If the block has multiple inputs, it performs an element-wise multiplication or division of the input signals. Scalar inputs are expanded to the necessary width.

If the block has a single input, it calculates the product or the reciprocal of the product of the elements of the input signal. In this case the sign displayed on the block icon changes to \(\prod\) or \(\frac{1}{\prod}\).

Parameters

Icon shape

Specifies whether the block is drawn with a round or a rectangular shape. Round shape icons permit a maximum of three inputs.

List of operators or number of inputs

The inputs can be specified either with a string containing * or / for each input and | for spacers, or a positive integer declaring the number of inputs.

Output data type

The data type of the output signal. See Data Types. If you choose inherited, the minimum data type is int8_t.

Data type overflow handling

Specifies how a data type overflow is handled. See Data Types. This parameter only appears if Output data type is not set to a floating-point data type.

Probe Signals

Input \(i\)

The \(i\)-th input signal.

Output

The block output signal.