MinMax Running Resettable
Determining the minimum or maximum of a signal over time.
Description
The MinMax Running Resettable block outputs the minimum or maximum of all past values of the u
input. Whether the block outputs minimum or maximum values is determined by the value of the Function parameter.
The block can reset its state based on an external reset signal R
. When the reset signal R
is different from zero true (1)
, the block resets the output of the Initial condition parameter value.
The input signal can be a scalar, vector or matrix signal. The block outputs a signal having the same dimensions as the input signal. Each output element is equal to the current minimum or maximum of the corresponding input elements.
The block icon changes depending on the function selected in the Function parameter.
Ports
Input
u - input signal
scalar
| vector
| matrix
Input signal; scalar, vector or matrix. The block outputs the minimum or maximum value of all past input data u
according to the value of the Function parameter.
If a scalar value is specified for the Initial condition parameter, the block will expand it so that it has the same dimensions as the non-scalar input u
.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
, Int128
, UInt128
, Fixed
.
R - reset signal
scalar
| vector
| matrix
An input port that accepts a reset signal as a scalar, vector, or matrix. If the reset signal is non-scalar, it must have the same dimensions as the input signal u
. As long as the reset signal has a zero value, the block outputs the current minimum or maximum value of the input u
. Whenever the reset signal has a non-zero value of true (1)
, the block resets the output to the value of the Initial condition parameter.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
, Int128
, UInt128
, Fixed
.
Output
y - current minimum or maximum value
scalar
| vector
| matrix
An output signal; a scalar, vector or matrix where each element is equal to the current minimum or maximum value of the corresponding input elements. The output signal y
has the same data type and dimensions as the input signal u
.
When the block receives a non-zero reset signal true (1)
, the block resets the output to the values of the Initial condition parameter.
Data types: Float64
.
Parameters
Function - mathematical function
min (by default)
| max
Specifies which function (min
or max
) will be applied to the input.
Block parameter |
|
Values |
|
By default |
|
Initial condition - initial value
0.0 (by default)
| scalar or vector
Initial value of the output signal. When the input reset signal R
has the value true (1)
, the block resets the output signal to this value.
Block parameter |
|
Values |
|
* By default* |
|