This is a static copy of a profile reportHome
clf (1 call, 0.031 sec)
Generated 15-Mar-2007 12:02:06 using real time.
M-function in file C:\Program Files\MATLAB71\toolbox\matlab\graphics\clf.m
[Copy to new window for comparing multiple runs]
Parents (calling functions)
Function Name | Function Type | Calls |
legacy | M-function | 1 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
48 | clo(fig, extra{:}); | 1 | 0.031 s | 100.0% |  |
30 | extra = varargin; | 1 | 0.000 s | 0.0% |  |
61 | if (nargout ~= 0) | 1 | 0.000 s | 0.0% |  |
41 | fig_was_numeric = true; | 1 | 0.000 s | 0.0% |  |
57 | refresh(fig) | 1 | 0 s | 0% |  |
Other lines & overhead | | | 0 s | 0% |  |
Totals | | | 0.031 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
gcf | M-function | 1 | 0 s | 0% |  |
graphics\private\clo | M-function | 1 | 0 s | 0% |  |
opaque.double | M-function | 1 | 0 s | 0% |  |
refresh | M-function | 1 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0.031 s | 100.0% |  |
Totals | | | 0.031 s | 100% | |
M-Lint results
Line number | Message |
21 | Use && instead of & as the AND operator in (scalar) conditional statements. |
21 | Use && instead of & as the AND operator in (scalar) conditional statements. |
21 | Use && instead of & as the AND operator in (scalar) conditional statements. |
21 | Use STRCMPI(str1,str2) instead of using LOWER in a call to STRCMP. |
25 | Use && instead of & as the AND operator in (scalar) conditional statements. |
25 | Use && instead of & as the AND operator in (scalar) conditional statements. |
Coverage results
[ Show coverage for parent directory ]
Total lines in file | 63 |
Non-code lines (comments, blank lines) | 36 |
Code lines (lines that can run) | 27 |
Code lines that did run | 17 |
Code lines that did not run | 10 |
Coverage (did run/can run) | 62.96 % |
Function listing
time calls line
1 function ret_fig = clf(varargin)
2 %CLF Clear current figure.
3 % CLF deletes all children of the current figure with visible handles.
4 %
5 % CLF RESET deletes all children (including ones with hidden
6 % handles) and also resets all figure properties, except Position
7 % and Units, to their default values.
8 %
9 % CLF(FIG) or CLF(FIG,'RESET') clears the single figure with handle FIG.
10 %
11 % FIG_H = CLF(...) returns the handle of the figure.
12 %
13 % See also CLA, RESET, HOLD.
14
15 % CLF(..., HSAVE) deletes all children except those specified in
16 % HSAVE.
17 %
18 % Copyright 1984-2005 The MathWorks, Inc.
19 % $Revision: 5.22.4.6 $ $Date: 2005/06/21 19:32:12 $
20
1 21 if nargin>0 & length(varargin{1})==1 & ishandle(varargin{1}) & strcmp(lower(get(varargin{1},'Type')),'figure')
22 % If first argument is a single figure handle, apply CLF to it
23 fig = varargin{1};
24 extra = varargin(2:end);
1 25 elseif nargin>0 & length(varargin{1})==1 & ~ishandle(varargin{1})
26 error('Invalid figure handle');
1 27 else
28 % Default target is current figure
1 29 fig = gcf;
< 0.01 1 30 extra = varargin;
1 31 end
32
33 % annotations are cleared by hand since the handle is hidden
1 34 scribeax = getappdata(fig,'Scribe_ScribeOverlay');
1 35 if ishandle(scribeax),
36 delete(get(handle(scribeax),'Shapes'));
37 end
38
39 % if IntegerHandle is 'off', then a numeric handle becomes invalid when RESET
40 % is called in CLO.
< 0.01 1 41 fig_was_numeric = true;
1 42 if isnumeric(fig)
1 43 fig_handle = handle(fig);
44 else
45 fig_was_numeric = false;
46 end
47
0.03 1 48 clo(fig, extra{:});
49
50 % cast back to double
1 51 if fig_was_numeric
1 52 fig = double(fig_handle);
1 53 end
54
55 % cause a complete redraw of the figure, so that movie frame remnants
56 % are cleared as well
1 57 refresh(fig)
58
59 % now that IntegerHandle can be changed by reset, make sure
60 % we're returning the new handle:
< 0.01 1 61 if (nargout ~= 0)
62 ret_fig = fig;
63 end