Set a global variable in a script with multiple functions
3 ビュー (過去 30 日間)
古いコメントを表示
I have a script that contains about 5 functions and they all need access to a String array.
Is there a way I can only define the string array once in the script but so all the functions can access it?
0 件のコメント
回答 (1 件)
Azzi Abdelmalek
2014 年 7 月 12 日
You can't do it, you have to declare the variable as global in each function
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Introduction to Installation and Licensing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!