Simink 条件分岐のモデルについて
Show older comments
入力値CNLTの大きさに応じて1または0を返す出力A,BのモデルをSwitchと論理演算で構成したいと思っています。
イメージしている振る舞いを以下に示します。
CNLT > 30 : A = 0,B = 0
CNLT > 15 && CNLT <= 30 : A = 0,B = 1
CNLT <= 15 : A = 1,B = 1
(変数略)
if (CNLT > 30){
A = 0;
B = 0;
}else if(CNLT > 15){
A = 0;
B = 1;
}else{
A = 1;
B = 1;
}
お手数おかけしますがご教授いただきたいです。
1 Comment
Toshinobu Shintai
on 16 Jan 2024
Relational Operatorブロック、Ifブロックなどを組み合わせて作成してみてはいかがでしょうか。
Accepted Answer
More Answers (0)
Categories
Find more on サブシステム in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
