simulink 变量作为判断条件怎么办 。

困扰我的问题 如题
a和b都是变量,在simulink中,若
1) a>0 b>0 输出c+d
2) a>0 b<0 输出c-d
3) a<0 b<0 输出c-0.5d
用switch模块能行嘛 我查网上没查到这方面信息!!求各位大神解答!!!!1

 Réponse acceptée

wiramol
wiramol le 30 Nov 2022

0 votes

if模块做两个输入u1 u2
if里面填 u1 > 0 & u2 >0
和C代码一样填就好了。

Plus de réponses (0)

Catégories

En savoir plus sur 启动和关闭 dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!