This is a static copy of a profile report

Home

graphics/private/clo (Calls: 12, Time: 0.037 s)
Generated 16-Jul-2020 17:08:45 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/matlab/graphics/private/clo.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
clafunction12
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
53
obj.clo(hsave, (do_reset == 1)...
120.035 s94.3%
48
if any(~isgraphics(hsave))
120.000 s1.3%
52
obj = handle(obj); % In case o...
120.000 s0.9%
28
if nargin > 2
120.000 s0.7%
38
if ~isempty(do_reset)
120.000 s0.6%
All other lines  0.001 s2.2%
Totals  0.037 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
...BaseAxesInteractionContainer.set.is2dclass method120.001 s1.5%
Self time (built-ins, overhead, etc.)  0.036 s98.5%
Totals  0.037 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function53
Non-code lines (comments, blank lines)22
Code lines (lines that can run)31
Code lines that did run24
Code lines that did not run7
Coverage (did run/can run)77.42 %
Function listing
time 
Calls 
 line
   1 
function clo(obj, in1, in2)
   2 
%CLO Clear object
   3 
%   CLO(H) deletes all children of the object with visible handles.
   4 
%
   5 
%   CLO(..., 'reset') deletes all children (including ones with hidden
   6 
%   handles) and also resets all object properties to their default
   7 
%   values.
   8 
%
   9 
%   CLO(..., HSAVE) deletes all children except those specified in
  10 
%   HSAVE.
  11 
%
  12 
%   See also CLF, CLA, RESET, HOLD.
  13 

  14 
%   Copyright 1984-2016 The MathWorks, Inc.
  15 

  16 
% decode input args:
< 0.001 
     12 
  17
hsave    = []; 
< 0.001 
     12 
  18
do_reset = ''; 
  19 

< 0.001 
     12 
  20
narginchk(1, 3); 
  21 

< 0.001 
     12 
  22
if nargin > 1 
< 0.001 
     12 
  23
    if ischar(in1) 
< 0.001 
     12 
  24
        do_reset = in1; 
  25 
    else
  26 
        hsave = in1;
< 0.001 
     12 
  27
    end 
< 0.001 
     12 
  28
    if nargin > 2 
< 0.001 
     12 
  29
        if ischar(in2) 
  30 
            do_reset = in2;
< 0.001 
     12 
  31
        else 
< 0.001 
     12 
  32
            hsave = in2; 
< 0.001 
     12 
  33
        end 
< 0.001 
     12 
  34
    end 
< 0.001 
     12 
  35
end 
  36 

  37 
% error-check input args
< 0.001 
     12 
  38
if ~isempty(do_reset) 
< 0.001 
     12 
  39
  if ~strcmp(do_reset, 'reset') 
  40 
    error(message('MATLAB:clo:unknownOption'))
< 0.001 
     12 
  41
  else 
< 0.001 
     12 
  42
    do_reset = 1; 
< 0.001 
     12 
  43
  end 
  44 
else
  45 
  do_reset = 0;
< 0.001 
     12 
  46
end 
  47 

< 0.001 
     12 
  48
if any(~isgraphics(hsave)) 
  49 
  error(message('MATLAB:clo:invalidHandle'))
< 0.001 
     12 
  50
end 
  51 

< 0.001 
     12 
  52
obj = handle(obj); % In case of double handle 
  0.035 
     12 
  53
obj.clo(hsave, (do_reset == 1)); % Call clo method on graphics class 

Other subfunctions in this file are not included in this listing.