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

16 views (last 30 days)
gosose
gosose on 30 Nov 2022
Answered: wiramol on 30 Nov 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

Accepted Answer

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

More Answers (0)

Categories

Find more on 启动和关闭 in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!