Simink 条件分岐のモデルについて
Afficher commentaires plus anciens
入力値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 commentaire
Toshinobu Shintai
le 16 Jan 2024
Relational Operatorブロック、Ifブロックなどを組み合わせて作成してみてはいかがでしょうか。
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur サブシステム dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
