| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Stateflow |
| Contents | Index |
| Learn more about Stateflow |
This table summarizes what's new in V5.1 (R13+):
| New Features and Changes | Version Compatibility Considerations | Fixed Bugs and Known Problems | Related Documentation at Web Site |
|---|---|---|---|
| Yes Details below | No | Fixed Bugs | No |
New features and changes introduced in this version are described here:
You can now represent truth tables in your Stateflow chart. Truth tables provide the convenience of specifying functions with logical behavior in a tabular form without having to draw flow graphs.
Because they are implemented on top of Stateflow graphical functions, Stateflow truth tables provide the following functionality:
Truth tables can be called from anywhere in the chart
Truth tables can call other truth tables
Truth tables can access all of chart data (inputs, outputs, locals)
Truth tables can broadcast events into Simulink models
Stateflow software provides its own analysis and diagnostics for underspecified and overspecified truth tables and fully integrates truth tables into the Stateflow Debugger and the Model Coverage tool.
Truth tables are documented in Truth Table Functions in the Stateflow and Stateflow Coder User's Guide.
You can use the following four new options for generating code for embedded and custom targets:
Compact nested if-else using logical AND/OR operators — Improves readability of generated code by compacting nested if-else statements using logical AND (&&) and OR (||) operators.
Recognize if-elseif-else in nested if-else statements — Improves readability of generated code by recognizing and emitting an if-elseif-else construct in place of deeply nested if-else statements.
Replace constant expressions by a single constant — Improves readability by preevaluating constant expressions and emitting a single constant. Furthermore, this optimization enables elimination of dead code.
Minimize array reads using temporary variables — In certain microprocessors, global array read operations are more expensive than accessing a temporary variable on the stack. Using this option minimizes array reads by using temporary variables when possible.
These coder options are documented in the Stateflow and Stateflow Coder User's Guide.
![]() | Version 5.1.1 (R13SP1) Stateflow and Stateflow Coder Software | Version 5.0 (R13) Stateflow and Stateflow Coder Software | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |