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

4 vues (au cours des 30 derniers jours)
Ishaan
Ishaan le 18 Mai 2022
Commenté : Ishaan le 12 Juin 2022
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 commentaires
Murali Sriram
Murali Sriram le 8 Juin 2022
Modifié(e) : Murali Sriram le 8 Juin 2022
You can try out the If-Then-Else block of simulink along with enabled subsystem block.
Ishaan
Ishaan le 12 Juin 2022
Thanks your suggestion worked.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Modeling dans Help Center et File Exchange

Tags

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by