Engee documentation

Rounding Function

Applying the rounding function to the signal.

rounding function

Description

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

The type of rounding is set by the Function parameter. The name of the selected function is displayed on the block.

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

Ports

Input

Port_1 - input signal
scalar | vector | matrix

Input signal to which the rounding function is applied.

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

Output

Port_1 - output signal
scalar | vector | matrix

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.

Parameters

Function - rounding function
floor (by default) | ceil | round | fix

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

Rounding function *Rrounds each element of the input signal.

floor

To the nearest integer in the direction of negative infinity

ceil

To the nearest integer in the direction of positive infinity

round

To the nearest integer

fix

To the nearest integer in the direction towards zero

Usage in program code

Block parameter

Operator

Values

floor | ceil | round | fix

By default

floor

Additional options

C code generation: Yes