Re: Close a GUI



f is not present anywhere in that function. Remember functions have
different workspaces from each other.

Try;

delete(gcf);
or
delete(findobj('Name','My 1st GUI'));
.