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 comentarios

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

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Modeling en Centro de ayuda y File Exchange.

Productos

Versión

R2021a

Etiquetas

Preguntada:

el 18 de Mayo de 2022

Comentada:

el 12 de Jun. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by