Product
If the block has more than one input, it performs element by element multiplication or division of its inputs. All inputs must have the same size and type as the output, but some inputs may also be 1x1. If the block has one input, the output is 1x1 and is obtained by multiplying (dividing) all the elements of the input vector/matrix. Multiply(*) and divide (/) characters indicate the operations to be performed on the inputs. See also the Matrix Multiplication block.
Library
MathOperations
Description
The Product block performs multiplication or division of its inputs. This block produces outputs using either element-wise or matrix multiplication, depending on the value of the Multiplication parameter. You specify the operations with the Number of inputs parameter. Multiply(*) and divide (/) characters indicate the operations to be performed on the inputs.
Inputs can be either real or complex.
Inputs are either scalar, or vector. If vector, all vectors must be of the same size.
In case of a single input, the output is the product of all elements of the input vector.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
nin | Number of inputs | Number | ||
in_ports | Input ports signs | Structure | ||
in_ports/sgn | Signs | Cell of strings | '*' | |
overflow | Do on overflow | String | 'Nothing' | |
rmethod | Rounding method (for integers) | String | 'Floor' | |
externalActivation | External activation | Number | 0 |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | explicit | input | nin | |
Port 2 | explicit | output | 1 | |
Port 3 | activation | input | externalActivation |
Advanced Properties
Name | Value | Description |
---|---|---|
always active | no | |
direct-feedthrough | yes | |
zero-crossing | no | |
mode | no | |
continuous-time state | no | |
discrete-time state | no |