Engee documentation

Rounding Function

Applies the rounding function to the signal.

rounding function

Description

Block Rounding Function rounds each element of the input signal to produce the output signal.

The type of rounding is set by the parameters Function. The name of the selected function is displayed on the unit.

Use the block *Rounding Function*when you need vector or matrix output.

Ports

Input

# IN_1 — input signal
scalar | vector | matrix

Details

The input signal to which the rounding function is applied.

Data types

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

Complex numbers support

No

Output

# OUT_1 — output signal
scalar | vector | matrix

Details

The output signal is the result of applying the rounding function to the input signal. The output signal has the same dimensions and data type as the input signal. Each element of the output signal is the result of applying the selected rounding function to the corresponding element of the input signal.

Data types

Float64.

Complex numbers support

No

Parameters

Main

# Function — rounding function
floor | ceil | round | fix

Details

Select the rounding function to be applied to the input signal.

Options to select from:

  • floor - rounds each element of the input signal to the nearest integer in the direction of negative infinity.

  • ceil - rounds each element of the input signal to the nearest integer in the direction of positive infinity.

  • round - rounds each element of the input signal to the nearest integer.

  • fix - rounds each element of the input signal to the nearest integer in the direction towards zero.

Values

floor | ceil | round | fix

Default value

floor

Program usage name

Operator

Tunable

No

Evaluatable

No

Additional options

C code generation: Yes