Get Stateflow parameters from MATLAB command line
6 views (last 30 days)
Show older comments
MathWorks Support Team
on 17 Nov 2019
Edited: MathWorks Support Team
on 18 May 2023
In my Simulink model, how do I obtain Stateflow chart parameters such as SampleTime, Update Method, State Machine type etc. from the MATLAB command line or programmatically?
Accepted Answer
MathWorks Support Team
on 14 May 2023
Edited: MathWorks Support Team
on 18 May 2023
Use the "get" command.
Pick an API function from one of the following links:
1. https://www.mathworks.com/help/stateflow/programmatic-interface.html
2. https://www.mathworks.com/help/stateflow/api/summary-of-stateflow-api-objects-and-properties.html
and then follow the procedure below:
>> % Obtain the Stateflow chart's object
>> Stateflow.State(ch)
>> % Use the get command with the API function name in char array form:
>> ch.get('Name')
>> ch.get('ChartUpdate')
>> ch.get('SampleTime')
>> ch.get('StateMachineType')
0 Comments
More Answers (0)
See Also
Categories
Find more on Complex Logic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!