Use Symbols pane while writing MATLAB function code
Starting in R2022a, you can view the Symbols pane while you write MATLAB® function code. In previous releases, you could use the Symbols pane to edit MATLAB function variables only from the Stateflow® Editor.
The Symbols pane displays the variables that you define in the signature label for the MATLAB function. After you make changes to the code, refresh the contents of the Symbols pane by saving the model, updating the model, returning to the chart canvas, or clicking a different pane.
Manage Stateflow breakpoints in the Simulink Breakpoints List pane
Starting in R2022a, you can use the new breakpoints list in the Simulink® Editor to manage breakpoints in your Stateflow chart. In previous releases, these breakpoints appear only in the Stateflow Breakpoints and Watch window. For more information, see Unified breakpoint list in the Simulink Editor for debugging.
Expanded string support for charts that use MATLAB as the action language
When using MATLAB as the action language, you can include:
String types with the operators: forward, hasChangedFrom, and hasChangedTo.
SDI with string type data. For more information about SDI, see Simulation Data Inspector (Simulink).
String type data in Truth Table blocks.
String type data in State Transition Table blocks.
Additionally, string truncation in charts that use MATLAB as the action language is on par with charts that use C as the action language.
Repeat data names at different levels of the chart hierarchy
Starting in R2022a, Stateflow charts that use MATLAB as the action language support data objects with the same name at different levels of the chart hierarchy. For example, you can now use the name of a chart symbol as an argument or return value for a graphical function, MATLAB function, or truth table. In previous releases, using the same data name in different levels of the chart hierarchy results in a compile-time error.
Export chart-level Simulink functions
Starting in R2022a, you can export chart-level Simulink functions in Stateflow charts by enabling the chart property Export chart level functions. In previous releases, enabling this property in a chart that contains chart-level Simulink functions results in a run-time error.
Convert states that contain supertransitions to atomic subcharts
You can now convert states to atomic subcharts, even when supertransitions cross the boundary of the state. Converting a state to an atomic subchart automatically replaces any supertransition into or out of the state with a transition that connects to an entry or exit port. Entry and exit ports enable your chart to transition across boundaries in the Stateflow hierarchy while isolating the logic for entering and exiting the atomic subchart. For more information, see Convert a State or Normal Subchart to an Atomic Subchart, Create Entry and Exit Connections Across State Boundaries, and Isolate the Transition Logic for Entering and Exiting an Atomic Subchart.
Note that you cannot undo the conversion to an atomic subchart. You can convert the atomic subchart back to a normal subchart, as described in Convert an Atomic Subchart to a Normal Subchart, but this action does not replace the new entry and exit ports with supertransitions.
Convert machine-parented data to chart-parented data store memory
Use the Upgrade Advisor check Check for machine-parented data (Simulink) to convert machine-parented data to
chart-parented data of scope Data Store Memory. For more
information, see Consult the Upgrade Advisor (Simulink). Machine-parented data will no longer be
supported in a future release.
Functionality being removed or changed
Use strong data typing with Simulink I/O chart property has been removed
Errors
In R2022a, the chart property Use strong data typing with Simulink I/O has been removed. Data types of input signals to charts and state transition tables must now match the type of the corresponding Stateflow data object. Otherwise, a type mismatch error occurs.