This is a static copy of a profile reportHome
graphics\private\clo (1 call, 0.000 sec)
Generated 15-Mar-2007 12:02:06 using real time.
M-function in file C:\Program Files\MATLAB71\toolbox\matlab\graphics\private\clo.m
[Copy to new window for comparing multiple runs]
Parents (calling functions)
Function Name | Function Type | Calls |
clf | M-function | 1 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
17 | hsave = []; | 1 | 0.000 s | 60.4% |  |
46 | kids_to_delete = []; | 1 | 0.000 s | 27.6% |  |
18 | do_reset = ''; | 1 | 0.000 s | 10.8% |  |
37 | do_reset = 0; | 1 | 0.000 s | 1.2% |  |
36 | else | 1 | 0.000 s | 0.0% |  |
Other lines & overhead | | | 0 s | 0% |  |
Totals | | | 0.000 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
graphics\private\clo>find_kids | M-subfunction | 1 | 0 s | 0% |  |
setdiff | M-function | 1 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0 s | 0% |  |
Totals | | | 0.000 s | 100% | |
M-Lint results
Line number | Message |
23 | Function 'ISSTR' is deprecated. Use 'ISCHAR' instead. |
23 | Extra comma is unnecessary. |
25 | Function 'ISSTR' is deprecated. Use 'ISCHAR' instead. |
25 | Extra comma is unnecessary. |
46 | The value assigned here to variable 'kids_to_delete' might never be used. |
Coverage results
[ Show coverage for parent directory ]
Total lines in file | 82 |
Non-code lines (comments, blank lines) | 34 |
Code lines (lines that can run) | 48 |
Code lines that did run | 19 |
Code lines that did not run | 29 |
Coverage (did run/can run) | 39.58 % |
Function listing
time calls line
1 function ret_obj = 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-2004 The MathWorks, Inc.
15
16 % decode input args:
< 0.01 1 17 hsave = [];
< 0.01 1 18 do_reset = '';
19
1 20 error(nargchk(1, 3, nargin));
21
1 22 if nargin > 1
23 if isstr(in1), do_reset = in1; else, hsave = in1; end
24 if nargin > 2
25 if isstr(in2), do_reset = in2; else, hsave = in2; end
26 end
27 end
28
29 % error-check input args
1 30 if ~isempty(do_reset)
31 if ~strcmp(do_reset, 'reset')
32 error('Unknown command option.')
33 else
34 do_reset = 1;
35 end
< 0.01 1 36 else
< 0.01 1 37 do_reset = 0;
1 38 end
39
1 40 if any(~ishandle(hsave))
41 error('Bad handle')
42 end
43
1 44 hsave = find_kids(obj, hsave);
45
< 0.01 1 46 kids_to_delete = [];
1 47 if do_reset
48 kids_to_delete = setdiff(findall(obj,'serializable','on','-depth',1),obj);
1 49 else
1 50 kids_to_delete = findobj(get(obj,'Children'),'flat',...
51 'HandleVisibility','on', 'serializable','on');
1 52 end
53
1 54 kids_to_delete = setdiff(kids_to_delete, hsave);
55
1 56 delete(kids_to_delete);
57
1 58 if do_reset,
59 handleobj = obj(ishandle(obj));
60 reset(handleobj);
61 % reset might have invalidated more handles
62 handleobj = handleobj(ishandle(handleobj));
63 % look for appdata for holding color and linestyle
64 for k=1:length(handleobj)
65 tobj = handleobj(k);
66 if isappdata(tobj,'PlotHoldStyle')
67 rmappdata(tobj,'PlotHoldStyle')
68 end
69 if isappdata(tobj,'PlotColorIndex')
70 rmappdata(tobj,'PlotColorIndex')
71 rmappdata(tobj,'PlotLineStyleIndex')
72 end
73 end
74 end
75
76 % now that IntegerHandle can be changed by reset, make sure
77 % we're returning the new handle:
1 78 if (nargout ~= 0)
79 ret_obj = obj(ishandle(obj));
80 end
81
82 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Other subfunctions in this file are not included in this listing.