MinMax
Searches for the minimum or maximum value.
Description
Block MinMax outputs either the minimum or maximum element(s) of the input signals. Whether the block outputs minimum or maximum values is determined by the value of the parameters Function.
The block MinMax ignores any input value that is equal to NaN
unless every input value is equal to NaN
. When all input values are equal to NaN
, the output is equal to 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
| matrix
Details
When a block has a single input port, the output is a scalar equal to the minimum or maximum element of the input signals.
When the unit has multiple 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 |
No |
Input
#
IN_1
—
input signal
scalar
| vector
| matrix
Details
An input signal from which the unit outputs maximum or minimum values.
-
When the block has a single input port, the input must be a scalar or vector. The block outputs a scalar equal to the minimum or maximum element of the input vector.
-
When a block has multiple input ports, all non-scalar input parameters must have the same dimensionality. The block expands any scalar input parameters to have the same dimensions as the non-scalar input parameters. The block outputs a signal that has the same dimensions as the input. Each output element is equal to the minimum or maximum of the corresponding input elements.
Dependencies
In order to support matrix input, the parameter Number of input ports set an integer greater than one. All non-scalar input parameters must have the same dimension.
Data types |
|
Complex numbers support |
No |
Parameters
Main
#
Function —
mathematical function
min
| max
Details
Specifies 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
Details
Specify the number of inputs.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |