setappdata Question
显示 更早的评论
Within a GUI if I want to create a variable in one function and use it in another is "setappdata" a good stratagy to use? I am trying to get away from any use of global variables
采纳的回答
更多回答(1 个)
Daniel Shub
2011-9-30
1 个投票
Yes, setappdata is a reasonable strategy and much better than a global variable. The FAQ provides some other alternatives.
类别
在 帮助中心 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!