Product
Product of Integer: y = u[1]*u[2]* ... *u[n]
Library
Modelica/Blocks/MathInteger
Description
This blocks computes the scalar Integer output "y" as product of the elements of theInteger input signal vector u:
y = u[1]*u[2]* ... *u[N];
The input connector is a vector of Integer input signals.When a connection line is drawn, the dimension of the inputvector is enlarged by one and the connection is automaticallyconnected to this new free index (thanks to theconnectorSizing annotation).
The usage is demonstrated, e.g., in exampleModelica.Blocks.Examples.IntegerNetwork1.
If no connection to the input connector "u" is present,the output is set to zero: y=0.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo_nu | nu | Number of input connections | Scalar |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo__nmodifiers | Number of Modifiers | Specifies the number of modifiers | Number | |
mo__modifiers | Modifiers | Add new modifier | Structure | |
mo__modifiers/varname | Variable name | Cell of strings | ||
mo__modifiers/attribute | Attribute | Cell of strings | 'start' | |
mo__modifiers/value | Value |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
u | implicit | Vector of Integer input signals | input | 1 |
y | implicit | Integer output signal | output | 1 |