Set Stateflow parameters from MATLAB command line

1 回表示 (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2019 年 11 月 17 日
編集済み: MathWorks Support Team 2023 年 5 月 18 日
In my Simulink model, how do I set Stateflow chart parameters such as SampleTime, Update Method, State Machine type etc. from the MATLAB command line or programmatically?

採用された回答

MathWorks Support Team
MathWorks Support Team 2023 年 5 月 14 日
編集済み: MathWorks Support Team 2023 年 5 月 18 日
Set chart parameters such as SampleTime, Update Method, State Machine type etc.
Use the "set" 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 set command with the API function and its setting in pairs of char arrays:
>> ch.set('Name', 'Kentucky')
>> % You can set more than one API function at the same time:
>> ch.set('ChartUpdate','DISCRETE','SampleTime','0.1','StateMachineType','Mealy');

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeComplex Logic についてさらに検索

タグ

タグが未入力です。

製品


リリース

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by