Simulink wire color based on signal value?

2 ビュー (過去 30 日間)
David Arenes
David Arenes 2021 年 4 月 21 日
コメント済み: Jonas 2021 年 4 月 21 日
Hello,
Is it possible to change the colour of a wire/line in simulink based on the value of the signal on that line?
As an example, showing the line in green when te value of the signal is >0 and red when <0.
Thank you on advance!

回答 (1 件)

Jonas
Jonas 2021 年 4 月 21 日
No. But you can preprocess the signal by multiplying it with a logical signal, which would be true when the signal is >0 for example. Then, you feed those separate signals to a Scope block using a Mux block. In the Scope block, you can change the individual signal color in the 'Style...' menu. There you can give the signal which is > 0 a green color. The disadvantage is that the signals will wrap down to 0 when 'not true'.
  1 件のコメント
Jonas
Jonas 2021 年 4 月 21 日
I guess it would work similarly when using the Simulation Data Inspector.

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

カテゴリ

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

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by