thanks,
torsten
> i want to close a figure (a GUI) with a pushbutton.
> what i have to write in the callback ?
The esiest thing to put in the callback is 'exit'.
'quit' will also work quite well.
You did not say you want matlab to remain running
after the figure closes.
I suppose if you just want to close the figure,
you could try something like 'delete(gcbf)' as
a callback.
Usually when I close a figure I want to return
something. That takes more work of course.
John
--
David
> The esiest thing to put in the callback is 'exit'.
> 'quit' will also work quite well.
>
> You did not say you want matlab to remain running
> after the figure closes.
When putting "quit cancel" in a file called finish.m Matlab will not
quit using "quit" of "exit", but all other matlab windows will be closed :-)
> I suppose if you just want to close the figure,
> you could try something like 'delete(gcbf)' as
> a callback.
you can use close(figure(1)) if the figure is made by the command
"figure" or you can make a handler to the figure when making is
(H=figure;) and later say "close(H)" to close it.
J.O. Entzinger