Main Content

Check relational comparisons on floating-point signals

Check ID: mathworks.hism.hisl_0016

Description

Identifies the relational blocks or operations that perform equality or inequality comparisons on floating-point signals.

Available with Simulink® Check™.

Results and Recommended Actions

ConditionRecommended Action
One or more relational operations used in the model perform equality or inequality comparisons on floating-point signals.

For the identified blocks and expressions, do one of these:

  • Change the signal data type.

  • Remodel to eliminate using == or ~= operators on floating-point signals.

One ore more If blocks used in the model have If expressions or Elseif expressions that might cause floating point equality or inequality comparisons in generated code.Modify the expressions to avoid floating point equality and inequality comparisons in generated code.

Capabilities and Limitations

  • Does not run on library models.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to all.

  • Allows exclusions of blocks and charts.

See Also