This is a static copy of a profile report

Home

Function details for graphics/private/cloThis is a static copy of a profile report

Home

graphics/private/clo (Calls: 2, Time: 0.006 s)
Generated 01-May-2020 20:23:09 using performance time.
function in file /Applications/MATLAB_R2018a.app/toolbox/matlab/graphics/private/clo.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
clafunction2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
53
obj.clo(hsave, (do_reset == 1)...
20.005 s74.0%
48
if any(~isgraphics(hsave))
20.000 s6.0%
52
obj = handle(obj); % In case o...
20.000 s4.5%
38
if ~isempty(do_reset)
20.000 s3.5%
28
if nargin > 2
20.000 s3.2%
All other lines  0.001 s8.8%
Totals  0.006 s100% 
Children (called functions)
No children
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 run23
Code lines that did not run8
Coverage (did run/can run)74.19 %
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 
      2 
  17
hsave    = []; 
< 0.001 
      2 
  18
do_reset = ''; 
  19 

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

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

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

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

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

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