This is a static copy of a profile report

Home

grid (2 calls, 0.021 sec)
Generated 18-Mar-2011 23:31:43 using cpu time.
M-function in file /Applications/MATLAB_R2010a.app/toolbox/matlab/graph2d/grid.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
generateBEMmeshM-function2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
57
if isappdata(ax,'MWBYPASS_grid...
20.010 s50.0%
93
set(ax,'XGrid', 'on', ...
20 s0%
92
elseif (strcmp(opt_grid, 'on')...
20 s0%
76
elseif (strcmp(opt_grid, 'mino...
20 s0%
60
elseif isequal(opt_grid, 0)
20 s0%
All other lines  0.010 s50.0%
Totals  0.021 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
gcfM-function20 s0%
Self time (built-ins, overhead, etc.)  0.021 s100.0%
Totals  0.021 s100% 
M-Lint results
No M-Lint messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function105
Non-code lines (comments, blank lines)35
Code lines (lines that can run)70
Code lines that did run15
Code lines that did not run55
Coverage (did run/can run)21.43 %
Function listing
   time   calls  line
1 function grid(arg1, arg2)
2 %GRID Grid lines.
3 % GRID ON adds major grid lines to the current axes.
4 % GRID OFF removes major and minor grid lines from the current axes.
5 % GRID MINOR toggles the minor grid lines of the current axes.
6 % GRID, by itself, toggles the major grid lines of the current axes.
7 % GRID(AX,...) uses axes AX instead of the current axes.
8 %
9 % GRID sets the XGrid, YGrid, and ZGrid properties of
10 % the current axes.
11 %
12 % set(AX,'XMinorGrid','on') turns on the minor grid.
13 %
14 % See also TITLE, XLABEL, YLABEL, ZLABEL, AXES, PLOT, BOX.
15
16 % Copyright 1984-2005, 2008 The MathWorks, Inc.
17 % $Revision: 5.13.4.4 $ $Date: 2008/05/05 21:38:12 $
18
19 % To ensure the correct current handle is taken in all situations.
20
2 21 opt_grid = 0;
2 22 if nargin == 0
23 ax = gca;
2 24 else
2 25 if isempty(arg1)
26 opt_grid = lower(arg1);
27 end
2 28 if ischar(arg1)
29 % string input (check for valid option later)
2 30 if nargin == 2
31 error(id('FirstArgAxes'),'First argument must be an axes handle.')
32 end
2 33 ax = gca;
2 34 opt_grid = lower(arg1);
35 else
36 % make sure non string is a scalar handle
37 if length(arg1) > 1
38 error(id('ScalarHandle'),'Axes handle must be a scalar.');
39 end
40 if ~any(ishghandle(arg1)) || ~strcmp(get(arg1, 'type'), 'axes')
41 error(id('FirstArgAxes'),'First argument must be an axes handle.');
42 end
43 ax = arg1;
44
45 % check for string option
46 if nargin == 2
47 opt_grid = lower(arg2);
48 end
49 end
2 50 end
51
2 52 if (isempty(opt_grid))
53 error(id('UnknownOption'),'Unknown command option.');
54 end
55
56 %---Check for bypass option
0.01 2 57 if isappdata(ax,'MWBYPASS_grid')
58 mwbypass(ax,'MWBYPASS_grid',opt_grid);
59
2 60 elseif isequal(opt_grid, 0)
61 if (strcmp(get(ax,'XGrid'),'off'))
62 set(ax,'XGrid','on');
63 else
64 set(ax,'XGrid','off');
65 end
66 if (strcmp(get(ax,'YGrid'),'off'))
67 set(ax,'YGrid','on');
68 else
69 set(ax,'YGrid','off');
70 end
71 if (strcmp(get(ax,'ZGrid'),'off'))
72 set(ax,'ZGrid','on');
73 else
74 set(ax,'ZGrid','off');
75 end
2 76 elseif (strcmp(opt_grid, 'minor'))
77 if (strcmp(get(ax,'XMinorGrid'),'off'))
78 set(ax,'XMinorGrid','on');
79 else
80 set(ax,'XMinorGrid','off');
81 end
82 if (strcmp(get(ax,'YMinorGrid'),'off'))
83 set(ax,'YMinorGrid','on');
84 else
85 set(ax,'YMinorGrid','off');
86 end
87 if (strcmp(get(ax,'ZMinorGrid'),'off'))
88 set(ax,'ZMinorGrid','on');
89 else
90 set(ax,'ZMinorGrid','off');
91 end
2 92 elseif (strcmp(opt_grid, 'on'))
2 93 set(ax,'XGrid', 'on', ...
94 'YGrid', 'on', ...
95 'ZGrid', 'on');
96 elseif (strcmp(opt_grid, 'off'))
97 set(ax,'XGrid', 'off', ...
98 'YGrid', 'off', ...
99 'ZGrid', 'off', ...
100 'XMinorGrid', 'off', ...
101 'YMinorGrid', 'off', ...
102 'ZMinorGrid', 'off');
103 else
104 error(id('UnknownOption'),'Unknown command option.');
105 end

Other subfunctions in this file are not included in this listing.