Engee documentation

MinMax

Page in progress.

Searches for the minimum or maximum value.

blockType: MinMax

Path in the library:

/Basic/Math Operations/MinMax

Description

The MinMax block 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 value of the Function parameter.

The MinMax block ignores any input value that is equal to NaN, except when 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 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

Float64

Complex numbers support

I don’t

Input

# IN_1 — Input signal
scalar | vector | 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, all non-scalar input parameters must have the same dimensions. The block extends any scalar input parameters to have the same dimensions as non-scalar input parameters. 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 one. All non-scalar input parameters must have the same dimensions.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

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

min | max

Default value

min

Program usage name

Function

Tunable

No

Evaluatable

No

# Number of input ports — number of input signals
Real number

Details

Specify the number of inputs.

Default value

1

Program usage name

Inputs

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

false (switched off)

Program usage name

InputSameDT

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.

Values

Inherit: auto | Same as first input | Float64 | Float32 | Float16 | Int8 | UInt8 | Int16 | UInt16 | Int32 | UInt32 | Int64 | UInt64 | Int128 | UInt128 | Bool | Fixed-point

Default value

Inherit: auto

Program usage name

OutDataTypeStr

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

fixdt(1, 16, 0)

Program usage name

OutDataTypeStrFixed

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 in 5, 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 in 5, 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

Ceiling | Convergent | Floor | Nearest | Round | Zero

Default value

Floor

Program usage name

RndMeth

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

false (switched off)

Program usage name

SaturateOnIntegerOverflow

Tunable

No

Evaluatable

No

Additional options

C code generation: Yes