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 CenterFile Exchange에서 Complex Logic에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by