State Machine v/s Flow Chart.
39 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
What is the difference between State Machine and Flow Chart in SateFlow ?
0 Kommentare
Antworten (2)
stozaki
am 9 Jan. 2020
Hello,
State machine is sequential decision logic and flow charts is combinatorial logic.
Please refer to the following documents.
Finite State Machine Concepts (MathWorks document)
Flow Charts in Stateflow (MathWorks document)
Combinational logic (Wiki)
Sequential logic (Wiki)
Regards,
0 Kommentare
Tomasz Karczmarski
am 18 Nov. 2020
If I tried to summarize stozaki's answer in a few sentences, it would go like this:
The main difference between flow chart and state machine is that flow charts represent an algorithm that will run from beginning to the end in one simulation step, while state machine contains temporary states that are reached during execution of the step, and represent the outcome of logic encoded in the state machine for that particular step. Upon commencing the next simulation step a flow chart will run again from the beginning to the end, consuming current inputs and computing outputs with no regard to what it computed before, while a state machine will resume from the state in which it ended up in the previous step and it will advance to another state (or stay in the same one) depending on current input, the logic programmed into the machine and the context in which it was put by previous inputs. That makes state machines well suited to model control systems.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Programmatic Model Editing 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!