This is a static copy of a profile reportHome
findobjhelper (26 calls, 0.041 sec)
Generated 18-Mar-2011 23:32:26 using cpu time.
M-function in file /Applications/MATLAB_R2010a.app/toolbox/matlab/graphics/findobjhelper.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
findobj | M-function | 26 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
6 | rootHandleVis = builtin( 'get'... | 26 | 0.021 s | 50.0% |  |
56 | h = findobjinternal( varargin{... | 26 | 0.010 s | 25.0% |  |
59 | end | 26 | 0 s | 0% |  |
58 | end | 26 | 0 s | 0% |  |
57 | end | 26 | 0 s | 0% |  |
All other lines | | | 0.010 s | 25.0% |  |
Totals | | | 0.041 s | 100% | |
Children (called functions)
No childrenM-Lint results
Line number | Message |
38 | { A{:} B } can often be replaced by [ A {B}], which can be much faster. |
44 | { A{:} B } can often be replaced by [ A {B}], which can be much faster. |
46 | { A{:} B } can often be replaced by [ A {B}], which can be much faster. |
50 | { A{:} B } can often be replaced by [ A {B}], which can be much faster. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 59 |
Non-code lines (comments, blank lines) | 11 |
Code lines (lines that can run) | 48 |
Code lines that did run | 12 |
Code lines that did not run | 36 |
Coverage (did run/can run) | 25.00 % |
Function listing
time calls line
1 function h = findobjhelper( varargin )
2
3 % Copyright 2009 The MathWorks, Inc.
4
26 5 nin = nargin;
0.02 26 6 rootHandleVis = builtin( 'get', 0, 'ShowHiddenHandles' );
26 7 findallargs = { '-property', 'type', '-not', {'-property', 'Internal'}, '-not', {'Internal', true} };
26 8 findobjargs = { '-property', 'type', '-not', {'-property', 'Internal'}, '-not', {'Internal', true}, 'HandleVisibility', 'on'};
9
26 10 if nin == 0
11 if feature('HgUsingMatlabClasses')
12 if strcmp( rootHandleVis, 'on' ) == 1
13
14 h = findobjinternal( 0, findallargs );
15 else
16 h = findobjinternal( 0, findobjargs );
17 end
18 else
19 h = findobjinternal(0);
20 end
26 21 else
26 22 if feature('HgUsingMatlabClasses')
23 hasflat = false;
24 args = {};
25 if ischar(varargin{1})
26 obj = handle(0);
27 args = varargin(1,:);
28 else
29 obj = varargin{1};
30 if nargin > 1
31 start = 2;
32 if strcmp( varargin{2}, 'flat' ) % Does the 'flat' keyword exist
33 hasflat = true;
34 start = 3;
35 end
36
37 for i=start:nargin
38 args = {args{:}, varargin{i}};
39 end
40 end
41 end
42 % Handle the 'findall' case
43 if strcmp( rootHandleVis, 'on' ) == 1
44 args = { findallargs args{:} };
45 else
46 args = { findobjargs args{:} };
47 end
48 % Handle the 'flat' case
49 if hasflat
50 args = { '-depth', 0, args{:} };
51 end
52 % obj
53 % args
54 h = findobjinternal( obj, args );
26 55 else
0.01 26 56 h = findobjinternal( varargin{:} );
26 57 end
26 58 end
26 59 end