MinMax
Searches for the minimum or maximum value.
blockType: MinMax
Path in the library:
|
Description
Block MinMax outputs either the minimum or maximum element(s) of the input signals. Whether the block outputs the minimum or maximum values is determined by the parameter value. Function.
Block MinMax ignores any input value that is equal to NaN, except when each input value is NaN. When all input values are equal NaN, the output is NaN, either as a scalar, or as the value of each element of the output vector.
Ports
Output
#
OUT_1
—
minimum or maximum values
scalar | vector | the matrix
Details
When the unit has one input port, the output is a scalar equal to the minimum or maximum element of the input signals.
When the unit has several input ports, the output is a signal having the same dimensions as the Input. Each output element is equal to the minimum or maximum of the corresponding input elements.
| Data types |
|
| Complex numbers support |
I don’t |
Input
#
IN_1
—
Input signal
scalar | vector | the matrix
Details
The input signal from which the unit outputs the maximum or minimum values.
-
When a block has one input port, the Input must be a scalar or a vector. The block outputs a scalar equal to the minimum or maximum element of the input vector.
-
When a block has several input ports, the dimension of the remaining ports is expanded to the maximum possible with the usage of broadcast operations. For example, if the Input signals have dimensions and , then using broadcast , the output will be an array of size . This process automatically expands arrays by dimensions equal to one in order to match the dimensions of the input data for calculations.
Broadcast is the process of automatically bringing arrays to compatible sizes to perform operations. Broadcast works according to the rules of "distribution" in dimensions equal to one: if the arrays have mismatched sizes, but at least one of the dimensions is equal to 1, then the operation is performed, while the array is expanded by the corresponding dimension.The dimension of scalar input signals increases to the dimension of non-scalar input signals, which is also achieved using the broadcast operation. If a block has several Inputs, and one of them is scalar, broadcast automatically expands it to the same dimension as the rest of the input data. The unit outputs a signal having the same dimensions as the Input. Each output element is equal to the minimum or maximum of the corresponding input elements.
Dependencies
To support matrix input, it is necessary for the parameter Number of input ports set an integer greater than or equal to 1. All non-scalar input parameters must have the same dimensions.
| Data types |
|
| Complex numbers support |
I don’t |
Parameters
Parameters
#
Function —
mathematical function
min | max
Details
Sets which of the functions (min or max), will be applied to the input signal.
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
Number of input ports —
number of input signals
Real number
Details
Specify the number of inputs.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
Main
#
Require all inputs to have the same data type —
The input data must have the same data type.
Logical
Details
Check this box so that all input data has the same data type.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
Output data type —
type of output data
Inherit: auto | Same as first input | Float64 | Float32 | Float16 | Int8 | UInt8 | Int16 | UInt16 | Int32 | UInt32 | Int64 | UInt64 | Int128 | UInt128 | Bool | Fixed-point
Details
Select the data type for the output data.
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
Output fixed-point type —
the output type of fixed-point numbers
Data type
Details
Specify the output type of fixed-point numbers.
Dependencies
To use this parameter, set for the parameter Output data type meaning Fixed-point.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
#
Integer rounding mode —
rounding mode for fixed point operations
Ceiling | Convergent | Floor | Nearest | Round | Zero
Details
Select the rounding mode for fixed-point operations. You can choose:
-
Ceiling— rounds up both positive and negative numbers (towards positive infinity). -
Convergent— rounds the number to the nearest representable value. If the fractional part of the number ends in5, the number is rounded to the nearest even integer. -
Floor— rounds down both positive and negative numbers (towards negative infinity). -
Nearest— rounds the number to the nearest representable value. If the fractional part of the number ends in5, the number is rounded up (towards positive infinity). -
Round— rounds the number to the nearest integer. -
Zero— rounds the number towards zero.
The block parameters are always rounded to the nearest representable value.
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
Saturate on integer overflow —
method of action in case of overflow
Logical
Details
When this check box is selected, the value that goes beyond the type limits is reset to the maximum or minimum value that the selected data type can represent. Otherwise, overflow transfer occurs.
When this option is selected, saturation is applied to all internal operations in the block, not just to the output or result.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |