How to close the current figure only?
49 views (last 30 days)
Show older comments
Dear all,
I am have a push button which was created by uicontrol. I want this figure only to be close after the push button is done. I tried to add 'close all' to my code but this will close all figures.
uicontrol('Style', 'pushbutton', 'String', 'SAVE',...
'Position', [20 20 50 20],...
'Callback', ...
@yourCallback); % what do you want to do?
function yourCallback(ObjH, EventData)
I = getimage;
setappdata(0, 'I', I);
restoGui; %the name of the GUI where the image to be transfer
clc
close all % will close all figures, but I want to close the current figure only
Any idea how to do that?
Thanks for any help.
Meshoo
0 Comments
Answers (1)
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!