12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

closePurpose2closeDelete specified figureSyntaxDescriptioncloseclose(h)close nameclose allclose all hiddenstatus = close(...)close deletes the current figure or the specified figure(s). It optionally returnsthe status of the close operation.close deletes the current figure (equivalent to close(gcf)).close(h) deletes the figure identified by h. If h is a vector or matrix, closedeletes all figures identified by h.close name deletes the figure with the specified name.close all deletes all figures whose handles are not hidden.close all hidden deletes all figures including those with hidden handles.status = close(...) returns 1 if the specified windows have been deletedand 0 otherwise.RemarksThe close function works by evaluating the specified figure’s CloseRequestFcnproperty with the statement:eval(get(h,'CloseRequestFcn'))The default CloseRequestFcn, closereq, deletes the current figure usingdelete(get(0,'CurrentFigure')). If you specify multiple figure handles,close executes each figure’s CloseRequestFcn in turn. If <strong>MATLAB</strong> encountersan error that terminates the execution of a CloseRequestFcn, the figure is notdeleted. Note that using your computer’s window manager (i.e., the Closemenu item) also calls the figure’s CloseRequestFcn.If a figure’s handle is hidden (i.e., the figure’s HandleVisibility property is setto callback or off and the root ShowHiddenHandles property is set on), you2-80

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!