How to implement multiple output condition using outport and switch

3 ビュー (過去 30 日間)
Sohail Khan
Sohail Khan 2019 年 6 月 25 日
コメント済み: Pullak Barik 2019 年 6 月 25 日
Here the code I want model in simulink:
if(x==0 and y==0)then
x=1;
y=2;
else
x=2
y=3
z=0
endif
I want model above code using switch,inport and outport.Can anyone help out with some example?

回答 (1 件)

Pullak Barik
Pullak Barik 2019 年 6 月 25 日
This query, though simple, seems incomplete and unclear. For instance, what happens to the value of 'z' if the if-condition holds true?
Anyways, you should find plenty of examples for the same, I am attaching some of them below-
2) Refer to the if-else semantics example by following the instructions in Simulink Subsystem Semantics.
3) You may also want to study about Switch blocks from Switch.
  1 件のコメント
Pullak Barik
Pullak Barik 2019 年 6 月 25 日
Simulink Subsystem Semantics also contains other examples that may help you out.

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

カテゴリ

Help Center および File ExchangeConditionally Executed Subsystems and Models についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by