Documentation Center

  • Trial Software
  • Product Updates

Contents

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

Was this topic helpful?