Static variables in MATLAB
显示 更早的评论
采纳的回答
更多回答(1 个)
Adam
2016-10-6
1 个投票
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 个评论
Ravi Singh
2020-4-23
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 ?
类别
在 帮助中心 和 File Exchange 中查找有关 Scope Variables and Generate Names 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!