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

16 visualizaciones (últimos 30 días)
gosose
gosose el 30 de Nov. de 2022
Respondida: wiramol el 30 de Nov. de 2022
困扰我的问题 如题
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
if模块做两个输入u1 u2
if里面填 u1 > 0 & u2 >0
和C代码一样填就好了。

Más respuestas (0)

Categorías

Más información sobre 启动和关闭 en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!