More efficient equivalent to while looping block in Simulink

1 次查看(过去 30 天)
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 个评论
Walter Roberson
Walter Roberson 2022-2-27
https://www.mathworks.com/matlabcentral/fileexchange/61633-fsolve-matlab-simulink-example
but you might not be able to deploy.

请先登录,再进行评论。

回答(1 个)

Mark McBroom
Mark McBroom 2022-2-26
You could try a MATLAB Function block and implement the logic in MATLAB.

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by