Stateflow flow logic questions

10 ビュー (過去 30 日間)
sudarshan Kanse
sudarshan Kanse 2022 年 11 月 4 日
コメント済み: sudarshan Kanse 2022 年 11 月 7 日
My question is if x < 8 then y should increase slowly till 3000. And if x > 8 then y should decrease slowly from 3000.

回答 (1 件)

Walter Roberson
Walter Roberson 2022 年 11 月 4 日
Okay, suppose you start and at time 0, x is (say) 25. So y should jump to 3000 (because of the "from 3000" requirement), and then it should start decreasing (at what rate? Is there any lower limit?)
consider the next time step, say 0.00025 . x is still 25, and following the rules, "y should decrease slowly from 3000". So lower value that y reached in the previous time step, it should jump back up to 3000, and start decreasing again. And this jump-up-and-decrease behaviour should happen every time step until something happens to change x to be less than 8.
But this is all having to happen every time step, and there is no time for y to decrease because decreasing would take time to happen, but you have to decrease y from 3000 every time .
Conclusion: if x ever becomes > 8 then y should jump to 3000 and stay there unchanging until something happens to make x < 8
  1 件のコメント
sudarshan Kanse
sudarshan Kanse 2022 年 11 月 7 日
Thank You ! For your valuble response

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDecision Logic についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by