Using Simulink | ![]() ![]() |
Perform the specified relational operation on the input.
Library
Description
The Relational Operator block performs a relational operation on its two inputs and produces output according to the following table.
If the result is TRUE, the output is 1; if FALSE, it is 0. You can specify inputs as scalars, arrays, or a combination of a scalar and an array:
The block icon displays the selected operator.
Data and Numeric Type Support
A Relational Operator block accepts real or complex signals of any data type. Both inputs must be of the same data type. One input may be real and the other complex, if the operator is ==
or !=
. The block outputs a signal of type boolean
, if Boolean logic signals are enabled (see Enabling Strict Boolean Type Checking). Otherwise, the block outputs a signal of type double
.
Parameters and Dialog Box
Characteristics
Direct Feedthrough |
Yes |
Sample Time |
Inherited from driving block |
Scalar Expansion |
Of inputs |
Dimensionalized |
Yes |
Zero Crossing |
Yes, to detect when the output changes |
![]() | Real-Imag to Complex | Relay | ![]() |