function ret_fig = clf(varargin)
%CLF Clear current figure.
%   CLF deletes all children of the current figure with visible handles.
%
%   CLF RESET deletes all children (including ones with hidden
%   handles) and also resets all figure properties, except Position
%   and Units, to their default values.
%
%   See also CLA, RESET, HOLD.

%   CLF(..., HSAVE) deletes all children except those specified in
%   HSAVE.
%
%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 5.18 $  $Date: 1998/06/29 14:56:08 $

clo(gcf, varargin{:});

% cause a complete redraw of the figure, so that movie frame remnants
% are cleared as well
refresh

% now that IntegerHandle can be changed by reset, make sure
% we're returning the new handle:
if (nargout ~= 0)
    ret_fig = gcf;
end
