Static variables in MATLAB
Mostra commenti meno recenti
How do I declare static variable in MATLAB?
Risposta accettata
Più risposte (1)
Adam
il 6 Ott 2016
1 voto
You can use persistent variables if that is what you mean, but only use them if you really need to. Similar to global variables they are far easier to introduce bugs into your workspace with then simply passing variables around between functions or using a class to define the scope of a variable.
1 Commento
Ravi Singh
il 23 Apr 2020
Hi Adam ,
I need to assign a static variable in one method call and use the same variable in another method call is there any way to do so ?
Categorie
Scopri di più su Scope Variables and Generate Names 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!