I have a GUIDE-built GUI I start from another script file, using the following to try to understand some things:
gui = fp_main_gui() % Start GUI, returning handle
h = figure(gui) % Set current figure
curfig = get(0,'CurrentFigure') % What is current figure?
produces
gui = 173.0125h = 173.0125curfig = []
The output of the first two lines is what I'd expect, but the third seems to indicate that the GUI figure has not been set as the current figure. Is there some difference between GUI figures and figures created with the "figure" function. I must be missing a conceptual point.
(Also I notice that a reference to "gcf" after the above always creates a new figure, which seems to imply that the GUI figure can not be the CurrentFigure.)
Thanks
Best Answer