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!