Benefits of using MATLAB® as the action language syntax for actions and conditions include:
MATLAB syntax support in state labels and transition labels.
You can use the same MATLAB code that you write in a script or enter at the command line.
Automatic inference of scope, size, type, and complexity for input, output, and local data.
When you update the diagram or start simulation, the Symbol Wizard provides a list of unresolved data in your chart and proposes that size, type, and complexity be inherited.
Support for control flow logic in state labels.
For example, you can write if-else statements directly inside state actions:
StateA du: if (x > 0) x = x + 1; else x = x + 2; end
You do not need to create a separate graphical function to define the flow logic.