This is a static copy of a profile report

Home

uigettool (178 calls, 0.230 sec)
Generated 05-Aug-2011 13:01:33 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/uitools/uigettool.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
scribe/private/updateLegendMenuToolbarfunction178
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
21
fig = findobj(allchild(fig),'f...
1740.066 s28.6%
25
children = findall(fig);
1780.055 s23.8%
29
if isequal(get(children(i),'Ta...
31320.044 s19.0%
28
toolid = getappdata(children(i...
31320.033 s14.3%
32
end
31320.022 s9.5%
All other lines  0.011 s4.8%
Totals  0.230 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
findobjfunction1740.055 s23.8%
findallfunction1780.044 s19.0%
allchildfunction1740 s0%
Self time (built-ins, overhead, etc.)  0.131 s57.1%
Totals  0.230 s100% 
Code Analyzer results
Line numberMessage
30The variable 'out' appears to change size on every loop iteration. Consider preallocating for speed.
Coverage results
[ Show coverage for parent directory ]
Total lines in function32
Non-code lines (comments, blank lines)18
Code lines (lines that can run)14
Code lines that did run12
Code lines that did not run2
Coverage (did run/can run)85.71 %
Function listing
   time   calls  line
1 function [out] = uigettool(fig,id)
2 % This function is undocumented and will change in a future release
3
4 % C = UIGETTOOL(H,'GroupName.ComponentName')
5 % H is a vector of toolbar handles or a figure handle
6 % 'GroupName' is the name of the toolbar group
7 % 'ComponentName' is the name of the toolbar component
8 % C is a toolbar component
9 %
10 % See also UITOOLFACTORY
11
12 % Copyright 1984-2007 The MathWorks, Inc.
13 % $Revision: 1.1.6.8 $ $Date: 2008/08/01 12:23:44 $
14
15 % Note: All code here must have fast performance
16 % since this function will be used in callbacks.
178 17 if ~all(ishghandle(fig))
18 error('MATLAB:uigettool:InvalidHandle','Invalid handle.');
19 end
178 20 if length(fig) == 1 && ishghandle(fig,'figure')
0.07 174 21 fig = findobj(allchild(fig),'flat','Type','uitoolbar');
174 22 end
23
178 24 out =[];
0.05 178 25 children = findall(fig);
26 % 'toolid' is used by GUIDE GUIs
178 27 for i=1:length(children)
0.03 3132 28 toolid = getappdata(children(i),'toolid');
0.04 3132 29 if isequal(get(children(i),'Tag'), id) || isequal(toolid, id)
0.01 174 30 out = [out; children(i)];
174 31 end
0.02 3132 32 end