Engee documentation

Compare To Zero

Comparing the input signal to zero.

compare to zero

Description

The Compare To Zero block compares the input signal to zero. The method of comparison is set by the Operator parameter.

Ports

Input

Port_1 - input signal
scalar

Input signal as a scalar for comparison with zero.

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

*Support for complex numbers: Yes

Output

Port_1 - output signal
0 | 1

The output is 0 if the comparison is false and 1 if it is true.

Data types: Bool, UInt8.

Parameters

Main

Operator - logical operator
< = (by default) | ~= | == | < | >= | >

This parameter can have the following values:

  • - determines whether the input value is equal to zero.

  • - determines whether the input value is not equal to zero.

  • - determines whether the input value is less than zero.

  • - determines whether the input value is less than or equal to zero.

  • - determines whether the input value is greater than zero.

  • - determines whether the input value is greater than or equal to zero. determines whether the input value is greater than or equal to zero.

Usage in program code

Block parameter

relop

Value

== | ~= | < | < = | >= | > | isInf | isNaN | isFinite

* By default*

< =

Output data type - output data type
Bool (by default) | UInt8

Specify the output data type as Bool or UInt8.

Usage in program code

Block parameter

OutDataTypeStr

Value

Bool | UInt8

By default

Bool

Additional options

C code generation: Yes