FUNCTION REFERENCE
close
Close a figure or finalize a VideoWriter.
Close a figure or finalize a VideoWriter.
Syntax
close(w)Syntax
w.close()Syntax
closeSyntax
close(n)Syntax
close allSyntax
close all forceSyntax
close all hiddenSyntax
close(h,'force')With no argument it closes the current figure. n is a figure number from 1 to 1000000; h is a figure number or figure handle. 'force' and 'hidden' are accepted in command and function form, case-insensitive; any other option is an error.
Example
close all % all figures are closedExample
figure; figure; close('all','force') % no figures remainExample
w=VideoWriter(tempname); open(w); close(w)For VideoWriter, close writes the AVI index and final counts, closes the temporary file and atomically replaces the destination. The handle remains available; open starts a new file. An empty writer creates no output.
Differences from MATLAB: VideoWriter output becomes visible only after finalization. Figure close takes a figure number, figure handle or 'all'. Figures have no CloseRequestFcn or HandleVisibility yet, so 'force' closes like a plain close and close all hidden closes the same figures as close all.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.