Persistent variable clear after simulation with simulink
Mostrar comentarios más antiguos
Hello, i have a problem, where I need help. I have decleared and initilized a persistent variable var in a Matlab Embedded Function in Simulink. For example
persistent var
if isempty(var)
var= 1
end
I noticed that the variable doesn't exist after the simulation end's. Thats why var is initialized again, when i start a simulation. Is this normal ? (I don't have any function in Model Property)
Respuesta aceptada
Más respuestas (1)
octus_ma
el 26 de Mayo de 2016
0 votos
Categorías
Más información sobre Naming Conventions en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!