Persistent variable clear after simulation with simulink
Mostra commenti meno recenti
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)
Risposta accettata
Più risposte (1)
octus_ma
il 26 Mag 2016
0 voti
Categorie
Scopri di più su Naming Conventions in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!