This is a static copy of a profile report

Home

graphics/private/positions>LocalUnion (40 calls, 0.022 sec)
Generated 05-Aug-2011 13:03:35 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/private/positions.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
graphics/private/positionsfunction40
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
33
pp = getget( handles, 'paperpo...
400.022 s100.0%
51
end
400 s0%
50
union = pp;
400 s0%
48
else
400 s0%
35
if length(handles) > 1
400 s0%
All other lines  0 s0%
Totals  0.022 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
graphics/private/getgetfunction400.022 s100.0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0.022 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function23
Non-code lines (comments, blank lines)9
Code lines (lines that can run)14
Code lines that did run5
Code lines that did not run9
Coverage (did run/can run)35.71 %
Function listing
   time   calls  line
29 function union = LocalUnion( handles )
30 %LocalUnion Get union of all PaperPositions
31
32 %Get cell array of positions
0.02 40 33 pp = getget( handles, 'paperposition' );
34
40 35 if length(handles) > 1
36 %loop through and get extent
37 union = [ inf inf -inf -inf ];
38 for i = 1:length(pp)
39 union(1) = min( union(1), pp{i}(1) );
40 union(2) = min( union(2), pp{i}(2) );
41 union(3) = max( union(3), pp{i}(1)+pp{i}(3) );
42 union(4) = max( union(4), pp{i}(2)+pp{i}(4) );
43 end
44
45 %Found location of maximum upper right corner, get width and height
46 union(3) = max( union(3) - union(1) );
47 union(4) = max( union(4) - union(2) );
40 48 else
49 %Just the one object with its own PaperPosition
40 50 union = pp;
40 51 end