How to Increment a constant value every time when I run the simulink ?
21 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I want to keep a track of how many times my simulink model is run ? without using persistant variable and I also want to reset a variable when the simulink model is closed ? Please let me know if you have any ideas to implement this logic.
0 comentarios
Respuestas (1)
Toshinobu Shintai
el 24 de Mayo de 2019
Generally speaking, it's impossible that you record statical value without using persistent variables.
If you can use Base Workspace variables, you can utilize Model Callbacks.
Example:
StartFcn : count up the counter.
CloseFcn : reset the counter to zero.
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!