| Version 4.1 (R12.1) Stateflow® and Stateflow® Coder™ Software Release Notes | ![]() |
This table summarizes what's new in V4.1 (R12.1):
| New Features and Changes | Version Compatibility Considerations | Fixed Bugs and Known Problems | Related Documentation at Web Site |
|---|---|---|---|
| Yes Details below | Yes—Details labeled as Compatibility Considerations, below. See also Summary. | Fixed Bugs | No |
New features and changes introduced in this version are:
Stateflow charts now include the graphical innovation of smart transitions whose ends slide around the surfaces of states and junctions. When the source and/or destination objects are moved and resized in the Stateflow chart, these transitions use sliding and other behaviors to enable users to produce an aesthetically pleasing chart.
This feature is fully documented in Extending Transitions with Smart Behavior in the Stateflow and Stateflow Coder User's Guide.
Note Transitions are automatically created with smart behavior on the assumption that this behavior is almost always desirable. However, self-loop transitions, must be created without smart transition behavior. See Self-Loop Transitions in the Stateflow and Stateflow Coder User's Guide for instructions. |
The Stateflow Search & Replace tool has been modified with the following enhancements:
Regular expression tokenized replacements
Allows you to dynamically choose replacement text based on matched text.
Case insensitivity/case preservation
Replaces text with different sensitivities to the use of upper or lower case characters in the found text.
Addition of a Search in: field
Now you can select any Stateflow chart in your Simulink model or select the entire Stateflow machine.
These enhancements are fully documented in the Stateflow and Stateflow Coder User's Guide.
You can now enter annotations to your Stateflow charts that are similar to annotations in Simulink models.
This feature is fully documented in Using Notes to Extend Charts in the Stateflow and Stateflow Coder User's Guide.
The Simulink Model Coverage tool has been modified to perform model coverage calculations for decisions and conditions of decision in the Stateflow machine and its charts, states, and transitions. This includes Condition and MCDC coverage.
This enhancement is fully documented in Understanding Model Coverage for Stateflow Charts in the Stateflow and Stateflow Coder User's Guide.
Code generation now emits single-precision constants with a trailing F to the C-compiler. This results in lower ROM size. For example, the action language statement x = y + single(1.375); now generates the code x = y + 1.375F;
Transition actions are now permitted only on transitions that terminate on states. For the following reasons, transition actions are no longer permitted on transitions that terminate on junctions:
The semantics of transition actions for transitions into junctions are complex and easily misunderstood and misused.
The complex semantics of these transition actions also result in generated code that is inefficient. Eliminating these transition actions not only simplifies Stateflow charts but also results in generated code that is much more efficient.
If your current model contains transition actions that terminate on junctions, they are flagged with an error. In most cases, replacing these transition actions with condition actions gives identical chart behavior.
Editing crossing transitions out of grouped subcharts caused model corruptions in Versions 3.0 through 4.0.2.
Stateflow library chart links that are disabled and then restored caused model corruptions in Versions 3.0 through 4.0.2.
Stateflow Debugger caused an error during simulation when a state has more than 255 action statements in Versions 1.0 through 4.0.2.
Charts within a Simulink enabled subsystem produced a false state inconsistency run-time error when the subsystem was disabled in Versions 2.0 through 4.0.3.
Selecting Save final value to base workspace in the properties dialog box for a data item caused unrelated MATLAB variables in the workspace to be overwritten in Versions 4.0 through 4.0.3.
The Custom Initialization and Custom Termination fields in the Target Options dialog box were overwritten by empty strings in the data dictionary in Version 4.0.3.
Transitions containing a temporal trigger combined with other event triggers, such as after(3E)|E2|E3, caused assertion errors during parsing in Version 4.0.3.
When including custom code, build failures occurred due to DOS shell command line length limitations because all user-defined directories on the MATLAB path were added to the include directory list in Version 4.0.3.
States with parallel decomposition with default transition paths generated incorrect code in Versions 3.0 through 4.0.2.
Double-precision whole numbers were incorrectly emitted as integers (e.g., 5 instead of 5.0) in code generation in Versions 3.0 through 4.0.2.
![]() | Version 5.0 (R13) Stateflow and Stateflow Coder Software | Version 4.0 (R12) Stateflow and Stateflow Coder Software | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |