How to implement a continue/return/skip current step in simulink?

How do I emplement equivalent of the following matlab in simulink
if(b == 0)
return % Skip Current Step and output previous value of c
else
c = a / b; % Output New value of c
end
if(v < 0 | i < 0)
return % Skip Current Step if voltage is negative
else
p = v / i; % Output New value of c
end

댓글 수: 2

Murali Sriram
Murali Sriram 2022년 6월 8일
편집: Murali Sriram 2022년 6월 8일
You can try out the If-Then-Else block of simulink along with enabled subsystem block.
Thanks your suggestion worked.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Modeling에 대해 자세히 알아보기

제품

릴리스

R2021a

태그

질문:

2022년 5월 18일

댓글:

2022년 6월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by