More efficient equivalent to while looping block in Simulink

1 vue (au cours des 30 derniers jours)
Serg
Serg le 21 Fév 2022
Commenté : Walter Roberson le 27 Fév 2022
Hello,
so I have a model in Simulink, which utilizes while iterator loop to meet a condition for each timestep. It was done in a manner of adding constant (0.01) to a constant (1.5) during each iteration until condition is met.
While the model work fine, the time of simulation seems to be way too long. Is there any equivalent or another way to "find-a-value"/iterate which would accelerate the process?
Thanks in advance!
  1 commentaire
Walter Roberson
Walter Roberson le 27 Fév 2022
https://www.mathworks.com/matlabcentral/fileexchange/61633-fsolve-matlab-simulink-example
but you might not be able to deploy.

Connectez-vous pour commenter.

Réponses (1)

Mark McBroom
Mark McBroom le 26 Fév 2022
You could try a MATLAB Function block and implement the logic in MATLAB.

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by