Stateflow: Flow chart with user input while running

4 Ansichten (letzte 30 Tage)
Hendrik Lorenz
Hendrik Lorenz am 7 Aug. 2018
Beantwortet: Hendrik Lorenz am 21 Aug. 2018
Hi all, I have the following problem: I want to simulate a flow chart in Stateflow. Some transitions in this flow chart depend on user input, i.e. if the user answers a question with yes or no. How can I implement this user input in Simulink? I thought about using the function questdlg within my Matlab script to get the user input and hand it over to simulink by a constant block. However, this does not work, because some questions are just raised in a certain path within the flow diagram. I do not want to ask for all the answers to the questions beforehand but when the right step in the flow diagram is reached. Does somebody has an idea of how to do it?
Best regards

Akzeptierte Antwort

Hendrik Lorenz
Hendrik Lorenz am 21 Aug. 2018
Found an answer to that question. The example "Modeling a Fitness Watcher" gave me a pretty good idea of how to do what I described here. Plus implementing a GUI with App Designer worked well.
https://de.mathworks.com/help/stateflow/examples/modeling-a-fitness-watcher.html

Weitere Antworten (0)

Kategorien

Mehr zu Modeling finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by