This is a static copy of a profile report

Home

graphics/private/clo (Calls: 5, Time: 0.020 s)
Generated 18-May-2021 16:05:24 using performance time.
function in file /usr/local/MATLAB/R2021a/toolbox/matlab/graphics/private/clo.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
clafunction5
Lines where the most time was spent

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

Function NameFunction TypeCallsTotal Time% TimeTime Plot
...sInteractionContainer.set.CurrentModeclass method50.001 s6.7%
...BaseAxesInteractionContainer.set.is2dclass method50.001 s2.5%
Self time (built-ins, overhead, etc.)  0.018 s90.8%
Totals  0.020 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 
      5 
  17
hsave    = []; 
< 0.001 
      5 
  18
do_reset = ''; 
  19 

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

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

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

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

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

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