Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

na_0013: Comparison operation in Stateflow

ID: Title

na_0013: Comparison operation in Stateflow

Priority

Recommended

Scope

MAAB

MATLAB Versions

All

Prerequisites

None

Description

  • Comparisons should be made only between variables of the same data type.

  • If comparisons are made between variables of different data types, the variables need to be explicitly type cast to matching data types.

Correct

Same data type in "i" and "n"

Incorrect

Different data type in "i" and "d"

Correct

Do not make comparisons between unsigned integers and negative numbers.

Incorrect

Rationale

  • Verification and Validation

  • Code Generation

  • Simulation

Last Changed

V2.1

Model Advisor Check

By Task > Modeling Standards for MAAB > Stateflow > Check for comparison operations in Stateflow charts

For check details, see Check for comparison operations in Stateflow charts (Simulink Verification and Validation).

Introduced in R2010a

Was this topic helpful?