allchild (156 calls, 0.252 sec)
Generated 14-Nov-2016 07:47:17 using cpu time.
function in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/uitools/allchild.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
...rnatePrintPath>LocalFindContainers | subfunction | 12 |
graphics/private/adjustbackground | function | 144 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
38 | ChildList=get(HandleList,'Chil... | 156 | 0.101 s | 40.0% | ![]() |
37 | c = onCleanup(@()set(rootobj,'... | 156 | 0.050 s | 20.0% | ![]() |
34 | Temp=get(rootobj,'ShowHiddenHa... | 156 | 0.020 s | 8.0% | ![]() |
35 | set(rootobj,'ShowHiddenHandles... | 156 | 0.010 s | 4.0% | ![]() |
24 | nonHGHandleList = HandleList(~... | 156 | 0.010 s | 4.0% | ![]() |
All other lines | 0.060 s | 24.0% | ![]() | ||
Totals | 0.252 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
onCleanup>onCleanup.onCleanup | subfunction | 156 | 0.040 s | 16.0% | ![]() |
onCleanup>onCleanup.delete | subfunction | 156 | 0.020 s | 8.0% | ![]() |
...set(rootobj,'ShowHiddenHandles',Temp) | anonymous function | 156 | 0 s | 0% | ![]() |
uitools/private/allchildRootHelper | function | 156 | 0 s | 0% | ![]() |
Self time (built-ins, overhead, etc.) | 0.192 s | 76.0% | ![]() | ||
Totals | 0.252 s | 100% |
Total lines in function | 38 |
Non-code lines (comments, blank lines) | 27 |
Code lines (lines that can run) | 11 |
Code lines that did run | 9 |
Code lines that did not run | 2 |
Coverage (did run/can run) | 81.82 % |
time | calls | line | |
---|---|---|---|
1 | function ChildList=allchild(HandleList) | ||
2 | %ALLCHILD Get all object children | ||
3 | % ChildList=ALLCHILD(HandleList) returns the list of all children | ||
4 | % (including ones with hidden handles) for each handle. If | ||
5 | % HandleList is a single element, the output is returned in a | ||
6 | % vector. Otherwise, the output is a cell array. | ||
7 | % | ||
8 | % Example: | ||
9 | % h_gca = gca; | ||
10 | % h_gca.Children | ||
11 | % %or | ||
12 | % allchild(gca) | ||
13 | % | ||
14 | % See also GET, FINDALL. | ||
15 | |||
16 | % Loren Dean | ||
17 | % Copyright 1984-2014 The MathWorks, Inc. | ||
18 | % | ||
19 | |||
0.01 | 156 | 20 | narginchk(1,1); |
21 | |||
22 | % figure out which, if any, items in list don't refer to hg objects | ||
0.01 | 156 | 23 | hgIdx = ishghandle(HandleList); % index of hghandles in list |
0.01 | 156 | 24 | nonHGHandleList = HandleList(~hgIdx); |
25 | |||
26 | % if any of the items in the nonHGHandlList aren't handles, error out | ||
156 | 27 | if ~isempty(nonHGHandleList) && ~all(ishandle(nonHGHandleList)), | |
28 | error(message('MATLAB:allchild:InvalidHandles')) | ||
29 | end | ||
30 | |||
31 | % establish the root object | ||
156 | 32 | rootobj = allchildRootHelper(HandleList); | |
33 | |||
0.02 | 156 | 34 | Temp=get(rootobj,'ShowHiddenHandles'); |
0.01 | 156 | 35 | set(rootobj,'ShowHiddenHandles','on'); |
36 | % Create protected cleanup | ||
0.05 | 156 | 37 | c = onCleanup(@()set(rootobj,'ShowHiddenHandles',Temp)); |
0.10 | 156 | 38 | ChildList=get(HandleList,'Children'); |