setappdata

3 次查看(过去 30 天)
Agata
Agata 2011-12-20
Hi, I have the problem with setappdata, can I use that metod outside GUI? In my own function?
Thanks for help:)

回答(1 个)

Sean de Wolski
Sean de Wolski 2011-12-20
set to the root directory and you can access from anywhere even after the gui figure is closed.
set(0,'mydata',magic(4));
from anywhere
my_data = getappdata(0,'mydata');
  1 个评论
Walter Roberson
Walter Roberson 2011-12-20
Interesting, that does work even with -nojvm

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 App Building 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by