Documentation Center

  • Trial Software
  • Product Updates

na_0007: Guidelines for use of Flow Charts, Truth Tables and State Machines

ID: Title

na_0007: Guidelines for use of Flow Charts, Truth Tables and State Machines

Priority

Strongly recommended

Scope

MAAB

MATLAB Versions

All

Description

Within Stateflow®, the choice of whether to use a flow chart or a state chart to model a given portion of the control algorithm functionality should be driven by the nature of the behavior being modeled.

  • If the primary nature of the function segment is to calculate modes of operation or discrete-valued states, use state charts. Some examples are:

    • Diagnostic models with pass, fail, abort, and conflict states

    • Model that calculates different modes of operation for a control algorithm

  • If the primary nature of the function segment involves if-then-else statements, use flowcharts or truth tables.

Specifics

If the primary nature of a function segment is to calculate modes or states, but if-then-else statements are required, add a flow chart to a state within the state chart. (See Flowchart Patterns.)

Rationale

  • Readability

  • Workflow

  • Simulation

  • Verification and Validation

  • Code Generation

Last Changed

V2.0

Model Advisor Check

Not applicable

Was this topic helpful?