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!