This is a static copy of a profile report

Home

close (19 calls, 0.262 sec)
Generated 05-Aug-2011 13:01:35 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/close.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
setPlotDisplayfunction17
reduceData>proceedsubfunction1
reduceDatafunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
100
status = request_close(h);
190.240 s91.7%
85
h = safegetchildren(closeForce...
190.022 s8.3%
103
if nargout==1
190 s0%
101
end
190 s0%
99
else
190 s0%
All other lines  0 s0%
Totals  0.262 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
close>request_closesubfunction190.240 s91.7%
close>safegetchildrensubfunction190.022 s8.3%
close>checkfigssubfunction190 s0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0.262 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function105
Non-code lines (comments, blank lines)43
Code lines (lines that can run)62
Code lines that did run25
Code lines that did not run37
Coverage (did run/can run)40.32 %
Function listing
   time   calls  line
1 function st = close(varargin)
2 %CLOSE Close figure.
3 % CLOSE(H) closes the window with handle H.
4 % CLOSE, by itself, closes the current figure window.
5 %
6 % CLOSE('name') closes the named window.
7 %
8 % CLOSE ALL closes all the open figure windows.
9 % CLOSE ALL HIDDEN closes hidden windows as well.
10 %
11 % STATUS = CLOSE(...) returns 1 if the specified windows were closed
12 % and 0 otherwise.
13 %
14 % See also DELETE.
15
16 % CLOSE ALL FORCE unconditionally closes all windows by deleting them
17 % without executing the close request function.
18 %
19 % CLOSE ALL may be over-ridden by setting appdata on the figure to
20 % 'IgnoreCloseAll' with a value of 1.
21 % setappdata(FIGH, 'IgnoreCloseAll', 1);
22 %
23 % CLOSE ALL FORCE may be over-ridden by setting appdata on the figure to
24 % 'IgnoreCloseAll' with a value of 2. This over-rides CLOSE ALL as well.
25 % setappdata(FIGH, 'IgnoreCloseAll', 2);
26
27 % Copyright 1984-2010 The MathWorks, Inc.
28 % $Revision: 5.42.4.17 $ $Date: 2010/07/27 21:08:03 $
29
19 30 h = [];
19 31 closeAll = 0;
19 32 closeForce = 0;
19 33 closeHidden = 0;
19 34 status = 1;
19 35 nameRequested = 0;
36
37 % Input can be <handle>, '<handle>', 'force', and/or 'all' in any order
19 38 for i=1:nargin
19 39 cur_arg = varargin{i};
40
19 41 if ischar(cur_arg)
19 42 switch lower(cur_arg)
19 43 case 'force',
44 closeForce = 1;
19 45 case 'all',
19 46 closeAll = 1;
47 case 'hidden',
48 closeHidden = 1;
49 case 'gcf',
50 h = [h gcf]; %#ok
51 case 'gcbf',
52 h = [h gcbf]; %#ok
53 otherwise
54 nameRequested = 1;
55 %Find Figure with given name, or it is command style call
56 hlist = findobj(get(0,'children'),'flat','name',cur_arg);
57 if ~isempty(hlist)
58 h = [h hlist]; %#ok
59 else
60 num = str2double(cur_arg);
61 if ~isnan(num)
62 h = [h num]; %#ok
63 end
64 end
65 end
66 else
67 h = [h cur_arg]; %#ok
68 if isempty(h), % make sure close([]) does nothing:
69 if nargout==1
70 st = status;
71 end
72 return
73 end
74 end
19 75 end
76
77 % If h is empty that this point, define it by context.
19 78 if isempty(h)
79 % If a name was requested and we didn't find
80 % a figure handle, error out
19 81 if nameRequested
82 error('MATLAB:close:WindowNotFound', 'Specified window does not exist.');
83 end
84
0.02 19 85 h = safegetchildren(closeForce, closeAll, closeHidden);
19 86 end
87
19 88 if (isa(h, 'ui.figure'))
89 % Convert GBT1.5 figure to a double.
90 h = double(h);
91 end
92
19 93 if ~checkfigs(h)
94 error('MATLAB:close:InvalidFigureHandle', 'Invalid figure handle.');
95 end
96
19 97 if closeForce
98 delete(h)
19 99 else
0.24 19 100 status = request_close(h);
19 101 end
102
19 103 if nargout==1
104 st = status;
105 end

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