how to create global variables for gui created using guide
1 次查看(过去 30 天)
显示 更早的评论
when I create a gui using guide, the generated code is basically a series of non-nested functions, starting with intialization functions, followed by call backs for my gui elements. I need all these functions to operate on a set of global variables; but I cannot define anything before the first function(or it errors out "Function definitions are not permitted in this context"). How am I supposed to do this?
0 个评论
回答(2 个)
Azzi Abdelmalek
2012-12-9
编辑:Azzi Abdelmalek
2012-12-9
If you want te handle data in your functions use guidata, or just save your data in Userdata of any object.
help guidata
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!