This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
33 | pp = getget( handles, 'paperpo... | 40 | 0.022 s | 100.0% |  |
51 | end | 40 | 0 s | 0% |  |
50 | union = pp; | 40 | 0 s | 0% |  |
48 | else | 40 | 0 s | 0% |  |
35 | if length(handles) > 1 | 40 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.022 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
graphics/private/getget | function | 40 | 0.022 s | 100.0% |  |
Self time (built-ins, overhead, etc.) | | | 0 s | 0% |  |
Totals | | | 0.022 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 23 |
Non-code lines (comments, blank lines) | 9 |
Code lines (lines that can run) | 14 |
Code lines that did run | 5 |
Code lines that did not run | 9 |
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