0

I have a pretty simple MATLAB stateflow model that I would like to visualize. I don't need anything fancy - even if I could just display a different image based on which substate a parallel state is in. Does anyone have any suggestions about what I can use to accomplish this? I've been looking around and all I could find was the 3D world builder with simulink, but I'm not even sure how I would connect that to stateflow.

Thanks.

1 Answers1

0

From the statechart you'll need to output a signal indicating which state the models is in. This can be achieved by having an entry action for the state that sets a variable to a given value.

Then you can display the signal in the same way as any Simulink signal - for instance using a Scope, a Display, or any one of the Dashboard blocks.

Phil Goddard
  • 10,571
  • 1
  • 16
  • 28
  • Thanks for the response! My simulation is that of an aircraft being boarded, so I would really like to move away from the graphical/numerical representations and go towards actual images/visuals - like having a traffic light change from green to red or something. Is the 3D world builder the best way to do this? – CoffeeDonut Oct 28 '17 at 16:42
  • The `Dashboard` library has blocks for doing things like that. Your other choices are to write a custom S-Function that diplays a custom visualization or something like the 3D World Builder - although in the first instance that seems like overkill. – Phil Goddard Oct 28 '17 at 16:47
  • Great, I'll look into those. Thanks so much! – CoffeeDonut Oct 28 '17 at 16:48