Setting Events in Matlab/Simulink Stateflow
Posted
by
GuiccoPiano
on Super User
See other posts from Super User
or by GuiccoPiano
Published on 2012-10-12T09:33:46Z
Indexed on
2012/10/12
9:40 UTC
Read the original article
Hit count: 188
matlab
How can I set an event in a Simulink Stateflow (statechart) based on some value. What I mean is this. I have a variable called "choice". This "choice" comes in as an input from a simulink block.The value of choice is between 1 and 4. So all I want to do is this:
if choice == 1 then trigger/set eventBlue
if choice == 2 then trigger/set eventRed
if choice == 3 then trigger/set eventWhite
if choice == 4 then trigger/set eventGreen
else trigger/set eventYellow
So how do i do that? what is the command?
© Super User or respective owner