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