Skip to Main Content Skip to Search
Product Documentation

Compare To Zero - Determine how signal compares to zero

Library

Logic and Bit Operations

Description

The Compare To Zero block compares an input signal to zero. Specify how the input is compared to zero with the Operator parameter. The Operator parameter can have the following values:

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

Data Type Support

The Compare To Zero block accepts inputs of the following data types:

The block output is uint8 or boolean, depending on your selection for the Output data type parameter. For more information, see Data Types Supported by Simulink in the Simulink documentation.

Parameters and Dialog Box

Operator

Specify how the input is compared to zero, as discussed in Description.

Output data type

Specify the data type of the output, uint8 or boolean.

Enable zero-crossing detection

Select to enable zero-crossing detection. For more information, see Zero-Crossing Detection.

Characteristics

Direct Feedthrough

Yes

Scalar Expansion

Yes

Multidimensionalized

Yes

Zero-Crossing Detection

Yes, if enabled.

See Also

Compare To Constant

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS