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 Kommentare

Murali Sriram
Murali Sriram am 8 Jun. 2022
Bearbeitet: Murali Sriram am 8 Jun. 2022
You can try out the If-Then-Else block of simulink along with enabled subsystem block.
Thanks your suggestion worked.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Modeling finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2021a

Tags

Gefragt:

am 18 Mai 2022

Kommentiert:

am 12 Jun. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by