Stateflow.EMChart
Stateflow interface to MATLAB Function block
Description
Use Stateflow.EMChart
objects to configure MATLAB
Function blocks through the Stateflow® programmatic interface. For more information, see Overview of the Stateflow API (Stateflow).
Tip
You can also configure the properties of a MATLAB Function block
programmatically by using a MATLABFunctionConfiguration
object. This object provides a direct interface to
the properties of a MATLAB Function block. For more information, see Configure MATLAB Function Blocks Programmatically.
Creation
Each MATLAB Function block has its own Stateflow.EMChart
object. When you add a MATLAB Function block to a Simulink® model, a Stateflow.EMChart
object is automatically created for
it. For example, you can use the function add_block
to add a MATLAB Function with the name MATLAB
Function
to a model called myModel
:
add_block("simulink/User-Defined Functions/MATLAB Function", ... "myModel/MATLAB Function")
Then, to access the
Stateflow.EMChart
object, call the find
(Stateflow) function for the loaded system:
block = find(get_param("myModel","Object"), ... "-isa","Stateflow.EMChart","Name","MATLAB Function");
Properties
Object Functions
find (Stateflow) | Identify specified objects in hierarchy |
getChildren (Stateflow) | Identify children of object |
dialog (Stateflow) | Open properties dialog box |
view (Stateflow) | Display object in editing environment |