overwrite an existing GUI
3 次查看(过去 30 天)
显示 更早的评论
good night everybody, is there anyone that knows anyfunction to count number of opened graphs because in my GUI, in the 1st interfaace I have a pusbutton and it is generating variables on another interface depends on the values entered by the user. When user wants to generate any other variables I want to overwrite the existing one so I guess it maybe possible to know the amount of figures and close all except 1st one, or how can I overwrite an existing table, I could not check the handle of table because handle is erased just after creation or not exist before execution for any suggestion thanks in advance good weekends
0 个评论
采纳的回答
Walter Roberson
2013-9-1
figurehandles = findall(0, '-type', 'figure');
number_of_figures_open = length(figurehandles);
4 个评论
Walter Roberson
2013-9-1
Have you considered tagging the graphic object you want to write into?
For example if you put all the relevant objects into a uipanel, then at the time of creation,
set(HandleOfUiPanel, 'Tag', 'ResultsPanel');
and then when you want to find it again,
HandleOfUiPanel = findobj(0, 'Tag', 'ResultsPanel');
if isempty(HandleOfUiPanel)
%oh... it doesn't exist at the moment! Recreate it?
end
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Specifying Target for Graphics Output 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!