It's simple to implement function block.

 Respuesta aceptada

Uday Pradhan
Uday Pradhan el 1 de Sept. de 2020
Editada: Uday Pradhan el 4 de Sept. de 2020

0 votos

Hi,
To mimic the while loop you can use the "While iterator subsytem" described here. I have attached my model of the subsytem which seems to be very complex but the logic is quite simple and described in the model itself. You will notice that stop time is set to 0, this is because the while iterator subsystem is configured to run while the condition is true or till the max number of iterations is exceeded so we can get the required answer in the first time step itself. I am sure the model could be made simpler so have a look to understand my implementation and make changes according to your needs.
Hope this helps.

Más respuestas (0)

Categorías

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

Productos

Versión

R2017a

Etiquetas

Preguntada:

el 31 de Ag. de 2020

Editada:

el 18 de Nov. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by