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

16 次查看(过去 30 天)
gosose
gosose 2022-11-30
回答: wiramol 2022-11-30
困扰我的问题 如题
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

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 启动和关闭 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!