Stateflow入門のロボット掃除機の所で解答と同じコードを入力しているのですがなぜかクリアすることが出来ないので、解決方法を教えていただきたいです。

 Akzeptierte Antwort

Atsushi Ueno
Atsushi Ueno am 29 Aug. 2021

1 Stimme

{SOC<30}と書くと「SOC<30」が「条件として判断」されません。
[requestMode==1||complete==1]を満足し遷移する時に「SOC<30」が「実行」されてしまいます。
[requestMode==1||complete==1 ********]の様に波括弧を使わず、角括弧の中にSOCの条件判断を含めるべきです。
>遷移ラベルは全体として次のような形式を取ります。
event_or_message[condition]{condition_action}/transition_action

Weitere Antworten (0)

Kategorien

Mehr zu Stateflow finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2021a

Community Treasure Hunt

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

Start Hunting!