switch controlled by signal

1 回表示 (過去 30 日間)
ZHEN XU
ZHEN XU 2019 年 2 月 21 日
回答済み: Dhanashree Mohite 2019 年 2 月 27 日
Like the picture showing, the simin block will has a series of data from matlab that only contains 0 and 1. I wanna the switch go to R1 when data is 0 and go to R2 when data is 1 during the simulation. How could I do this ? Thank you. Capture.PNG
  1 件のコメント
Dhanashree Mohite
Dhanashree Mohite 2019 年 2 月 27 日
Please elaborate on below points:
  1. You want to change one value of the series or multiple values at same time?
  2. What is the purpose of providing series to selection input of switch block, as at a time only one will be connected.

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

回答 (1 件)

Dhanashree Mohite
Dhanashree Mohite 2019 年 2 月 27 日
In case if one value to be given to the to selection input of switch block, you can use below options:
  1. Use constant block and change its value property using set_param from command window.
  2. Use toggle switch of dashboard in model itself and connect it to constant block. You’ll be able to change value through model itself.

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by