How can I get a user-defined function executed after a given state in stateflow?

2 ビュー (過去 30 日間)
Taruna Yadav
Taruna Yadav 2017 年 5 月 8 日
回答済み: Wilson A N 2017 年 5 月 11 日
I am using Matlab 2015. I have a stateflow graph (in simulink) with different states. I want to execute a function defined by me (or atleast few lines of code using MATLAB built in functions) in between two states of the stateflow. So, I need the whole model to run the stateflow and as it enters in state A, it should run a function and then go to state B. Can anybody provide hints/solutions to this problem?

回答 (1 件)

Wilson A N
Wilson A N 2017 年 5 月 11 日
You can check out the following links which explain how to include MATLAB functions in Stateflow charts:
Moreover, you can also execute the following command to open the built-in example which shows how to include MATLAB functions in Stateflow Charts:
>> sf_server

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by