フィルターのクリア

How can I make a transition when a variable does not change its value?

2 ビュー (過去 30 日間)
Camba
Camba 2016 年 5 月 4 日
編集済み: zhihui diao 2016 年 5 月 26 日
I have a stateflow chart that has a signal from a signal builder block as its input. I want to have a transition between two states that when two conditions happen:
  • The signal has its value below a threshold.
  • The signal value has not changed by a factor of delta for T seconds
Does anyone have any idea how do I do that?

採用された回答

Swarooph
Swarooph 2016 年 5 月 4 日
One way to do this would be to use some sort of an intermediate state to toggle between the condition. See screenshot at the end of the post.
For (1) use a < symbol and a threshold value. Use the OR operator ('||') to check for an interval.
e.g. screenshot of logic below:

その他の回答 (1 件)

zhihui diao
zhihui diao 2016 年 5 月 26 日
編集済み: zhihui diao 2016 年 5 月 26 日
or you can build a time counter inter the second state use "during" sytax

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by