How to activate Stateflow substate without flow graph

조회 수: 1 (최근 30일)
olivier
olivier 2012년 6월 21일
Hello,
I have 2 charts composed of several substates and when (for instance) going from chart1 to chart2, the active substate in chart2 should depend on the on conditions elaborated in the substates of chart1 . Drawing all the possible connections (with flow graph), would result in a "spaghetti" chart, so I was wondering if there is an other way to activate a substate.
Thank you

답변 (1개)

Siddharth Shankar
Siddharth Shankar 2012년 7월 6일
Can you please expand on the question a bit? It would help if you could sketch out a very simple example example with maybe just 2-3 states in chart1 and the corresponding transitions required in chart2.
Something which might work (without knowing exactly what the problem is) is "Inner transitions". One place where you do get a lot of transitions is a situation where whenever some condition is true, you want to transition to a given state irrespective of where you are. In this case, suppose you have N states each with a condition [ci] for transitioning to it, you will need N^2 transitions to spell out the behavior correctly.
To avoid this, you can use inner transitions. This reduces you to only need N inner transitions rather than N^2 outer transitions.
This is probably best explained using a sketch but unfortunately I do not know of a way to attach an image.
  댓글 수: 1
K E
K E 2012년 7월 12일
편집: K E 2012년 7월 12일
Here is some information on inserting an image in a reply, and you can use the new image button on answer and comment blanks to insert it.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Complex Logic에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by