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

 Respuesta aceptada

wiramol
wiramol el 30 de Nov. de 2022

0 votos

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

Más respuestas (0)

Categorías

Más información sobre 启动和关闭 en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 30 de Nov. de 2022

Respondida:

el 30 de Nov. de 2022

Community Treasure Hunt

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

Start Hunting!