Switch case for subsystem ?

8 ビュー (過去 30 日間)
Steve
Steve 2015 年 1 月 19 日
回答済み: Rajanya 2025 年 2 月 19 日 11:28
Hi all,
I have two subsystems, each containing a close loop with there own controller. I have an input value ranging from 0-10. I will like to know which simulink block i can use to create a condition whereby depending on the input value it would choose one of the two subsystems.
Example :
If 0-5 choose subsystem 1 Else choose subsystem 2
Thank you

回答 (1 件)

Rajanya
Rajanya 2025 年 2 月 19 日 11:28
Hi @Steve,
If you only want the result from the selected subsystem, you can use the 'Switch' block, with 'input' connected to the 'condition' port of the 'Switch' and the outputs from the two subsystems connected to the other ports. But in such a setup, both subsystems will execute and produce outputs, from which the 'Switch' will select the output from the desired subsystem based on the 'input' value.
On the other hand, if you want only the desired subsystem to 'execute', creating a setup using 'Variant subsystem' with 'input' as the variant control would be the way to go.
Thanks!

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by