This is a static copy of a profile reportHome
subplot>addAxesToGrid (159 calls, 0.284 sec)
Generated 05-Aug-2011 13:03:27 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/graph2d/subplot.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
subplot | function | 159 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
597 | createListeners(p, handle(list... | 155 | 0.262 s | 92.3% |  |
600 | subplotlayoutInvalid(handle(ax... | 155 | 0.011 s | 3.8% |  |
596 | list(~ishghandle(list)) = []; ... | 155 | 0.011 s | 3.8% |  |
601 | end | 155 | 0 s | 0% |  |
599 | setappdata(ax, 'SubplotPositio... | 155 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.284 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
subplot>createListeners | subfunction | 155 | 0.251 s | 88.5% |  |
Self time (built-ins, overhead, etc.) | | | 0.033 s | 11.5% |  |
Totals | | | 0.284 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 27 |
Non-code lines (comments, blank lines) | 1 |
Code lines (lines that can run) | 26 |
Code lines that did run | 20 |
Code lines that did not run | 6 |
Coverage (did run/can run) | 76.92 % |
Function listing
time calls line
575 function addAxesToGrid(ax, nRows, nCols, row, col, position)
159 576 p = get(ax, 'Parent');
159 577 grid = getappdata(p, 'SubplotGrid');
159 578 if isempty(grid)
25 579 grid = zeros(nRows, nCols);
25 580 end
159 581 if any(size(grid) ~= [nRows, nCols])
3 582 return
583 end
156 584 if length(row) ~= 1 || length(col) ~= 1
1 585 return
586 end
155 587 if round(row) ~= row || round(col) ~= col
588 return
589 end
155 590 if grid(row + 1, col + 1) == ax
591 return
592 end
155 593 grid(row + 1, col + 1) = ax;
155 594 list = grid(:);
155 595 list(list == 0) = []; % remove root
0.01 155 596 list(~ishghandle(list)) = []; % remove invalid handles
0.26 155 597 createListeners(p, handle(list));
155 598 setappdata(p, 'SubplotGrid', grid)
155 599 setappdata(ax, 'SubplotPosition', position); % normalized
0.01 155 600 subplotlayoutInvalid(handle(ax), [], p);
155 601 end
Other subfunctions in this file are not included in this listing.