This is a static copy of a profile reportHome
is2D (708 calls, 0.087 sec)
Generated 05-Aug-2011 13:02:45 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/is2D.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 |
12 | camUp = get(ax,'CameraUpVector... | 708 | 0.044 s | 50.0% |  |
11 | ax_view = get(ax,'View'); | 708 | 0.033 s | 37.5% |  |
10 | VIEW_2D = [0,90]; | 708 | 0.011 s | 12.5% |  |
20 | end | 708 | 0 s | 0% |  |
19 | retval = isequal(ax_view,VIEW_... | 708 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.087 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
Line number | Message |
16 | The variable 'retval' appears to change size on every loop iteration. Consider preallocating for speed. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 20 |
Non-code lines (comments, blank lines) | 10 |
Code lines (lines that can run) | 10 |
Code lines that did run | 7 |
Code lines that did not run | 3 |
Coverage (did run/can run) | 70.00 % |
Function listing
time calls line
1 function [retval] = is2D(ax)
2 % Internal use only. This function may be removed in a future release.
3
4 % Copyright 2002-2005 The MathWorks, Inc.
5
6 %IS2D Return true if axes is 2-D
7
8 % For now, just consider x-y plots. A more generic version is
9 % commented out below.
0.01 708 10 VIEW_2D = [0,90];
0.03 708 11 ax_view = get(ax,'View');
0.04 708 12 camUp = get(ax,'CameraUpVector');
708 13 if iscell(ax_view)
14 % ToDo: replace for loop with cellfun
15 for n = 1:length(ax_view)
16 retval(n) = isequal(ax_view{n},VIEW_2D) && isequal(abs(camUp{n}),[0 1 0]);
17 end
708 18 else
708 19 retval = isequal(ax_view,VIEW_2D) && isequal(abs(camUp),[0 1 0]);
708 20 end
Other subfunctions in this file are not included in this listing.