How many times does a Matlab Function in Simulink run in one time step
Mostrar comentarios más antiguos
Hello,
I have a Matlab Function in a Simulink model. Because the Matlab Funtion is time-confusing, I just want it to run one time in a step. But it seems to run multiple (>5) times in a step. I was wondering whether the number of times a Matlab function runs in a step depends on the solver (ode1,ode4, etc) selected. Can anyone provide some insights into this question? Thank you.
Regards Pan
Respuesta aceptada
Más respuestas (1)
Ankit Bhatnagar
el 15 de Mayo de 2017
0 votos
Hi,
There are ways to start the block after a particular major step time like using a Clock block from Simulink/Sources and using simulation time feature of a block but currently not possible to execute a block as an independent task in Simulink.
Please refer this MATLAB Answers post for further details:
- https://www.mathworks.com/matlabcentral/answers/262892-how-do-i-make-a-simulink-embedded-function-run-independent-of-the-time-step-of-the-model
1 comentario
Pan Zhao
el 25 de Mayo de 2017
Categorías
Más información sobre Event Functions en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!