how to use matlab function in simulink when there are while loops in function?

For example:
function y = fcn(u) if u>-1 y = 2; elseif u<=-1 y=4; end end
the input of function is a ramp block of the simulink.
Thanks

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Modeling 的更多信息

提问:

2015-11-17

Community Treasure Hunt

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

Start Hunting!

Translated by