How to use handles in a function??
2 ビュー (過去 30 日間)
古いコメントを表示
Hi everybody!
I need to use a pushbutton handles in a function that I use in my fig's .m file.
I have to use a set: at the end of the actions made by the function, this pushbutton has to be shown...
When I run my function, naturally it tells to me that it can't recognize the handles (because in the function there're no handles!)... There's a way to "globalize" my handles??
I don't know if it's correct to assign a variable to my handles, something like
var=handles.tag;
or to use "setappdata" and "getappdata" functions... Can anyone help me?? Thanks a lot!!
0 件のコメント
採用された回答
Walter Roberson
2012 年 1 月 19 日
Before the line that accesses handles, add
handles = guidata(gcf);
0 件のコメント
その他の回答 (2 件)
Jan
2012 年 1 月 19 日
Currently the description of the problem is not clear. The values or the handles cannot be "published" automatically. Storing them using SETAPPDATA is not helpful also, because usually the handles struct is stored in the ApplicationData by calling guidata already.
Please explain the problem again with more details by editing the original message - not as comment or answer.
参考
カテゴリ
Help Center および File Exchange で Maintain or Transition figure-Based Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!