MATLAB: Get Stateflow parameters from MATLAB command line

stateflow

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?

Best Answer

Use the "get" command.
Pick an API function from one of the following links:
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')