This is a static copy of a profile report

Home

scribe/private/expandLegendChildren (2 calls, 0.073 sec)
Generated 18-Mar-2011 23:32:04 using cpu time.
M-function in file /Applications/MATLAB_R2010a.app/toolbox/matlab/scribe/private/expandLegendChildren.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
scribe/private/get_legendable_childrenM-function2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
11
hA = get(legKids(i),'Annotatio...
3720.041 s57.1%
22
else
3720.010 s14.3%
14
if ishandle(hL) && str...
3720.010 s14.3%
13
hL = get(hA,'LegendInformation...
3720.010 s14.3%
28
end
3720 s0%
All other lines  0 s0%
Totals  0.073 s100% 
Children (called functions)
No children
M-Lint results
Line numberMessage
17The variable 'legKidsOut' appears to change size on every loop iteration. Consider preallocating for speed.
20The variable 'legKidsOut' appears to change size on every loop iteration. Consider preallocating for speed.
23The variable 'legKidsOut' appears to change size on every loop iteration. Consider preallocating for speed.
26The variable 'legKidsOut' appears to change size on every loop iteration. Consider preallocating for speed.
Coverage results
[ Show coverage for parent directory ]
Total lines in function28
Non-code lines (comments, blank lines)10
Code lines (lines that can run)18
Code lines that did run10
Code lines that did not run8
Coverage (did run/can run)55.56 %
Function listing
   time   calls  line
1 function legKidsOut = expandLegendChildren(legKids)
2 %EXPANDLEGENDCHILDREN recursively goes through a list of graphics objects,
3 % expanding groups whose "LegendEntry" display property is set to
4 % "Children".
5
6 % Copyright 2007 The MathWorks, Inc.
7
8
2 9 legKidsOut = [];
2 10 for i = 1:length(legKids)
0.04 372 11 hA = get(legKids(i),'Annotation');
372 12 if ishandle(hA)
0.01 372 13 hL = get(hA,'LegendInformation');
0.01 372 14 if ishandle(hL) && strcmpi(hL.IconDisplayStyle,'Children')
15 if isprop(handle(legKids(i)),'Children') && ...
16 ~isempty(get(legKids(i),'Children'))
17 legKidsOut = [legKidsOut;...
18 expandLegendChildren(get(legKids(i),'Children'))];
19 else
20 legKidsOut = [legKidsOut;legKids(i)];
21 end
0.01 372 22 else
372 23 legKidsOut = [legKidsOut;legKids(i)];
372 24 end
25 else
26 legKidsOut = [legKidsOut;legKids(i)];
27 end
372 28 end