graphics/private/modifyUnitsForPrint>getObjWithUnits (6 calls, 0.040 sec)
Generated 14-Nov-2016 07:47:19 using cpu time.
nested function in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/graphics/private/modifyUnitsForPrint.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
graphics/private/modifyUnitsForPrint | function | 6 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
84 | objWithUnits = findall(h, 'fla... | 30 | 0.040 s | 100.0% | ![]() |
98 | end | 6 | 0 s | 0% | ![]() |
97 | end | 30 | 0 s | 0% | ![]() |
96 | end | 30 | 0 s | 0% | ![]() |
95 | objUnitsModified.(units{unitsI... | 30 | 0 s | 0% | ![]() |
All other lines | 0 s | 0% | ![]() | ||
Totals | 0.040 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
findall | function | 30 | 0.040 s | 100.0% | ![]() |
Self time (built-ins, overhead, etc.) | 0 s | 0% | ![]() | ||
Totals | 0.040 s | 100% |
Total lines in function | 19 |
Non-code lines (comments, blank lines) | 9 |
Code lines (lines that can run) | 10 |
Code lines that did run | 9 |
Code lines that did not run | 1 |
Coverage (did run/can run) | 90.00 % |
time | calls | line | |
---|---|---|---|
80 | function objUnitsModified = getObjWithUnits(h, unitsProp, units) | ||
81 | % Returns an array of objects which have the unitsProp property | ||
82 | % value set to the specified units. | ||
6 | 83 | for unitsIdx = 1:length(units) | |
0.04 | 30 | 84 | objWithUnits = findall(h, 'flat', unitsProp, units{unitsIdx}); |
85 | |||
86 | % Don't include the figure itself in this list | ||
30 | 87 | objUnitsModified.(units{unitsIdx}).handles = objWithUnits(~ishghandle(objWithUnits, 'figure')); | |
88 | |||
89 | % The get command returns a cell array when passed multiple | ||
90 | % handles. To keep the code simple downstream, wrap the single | ||
91 | % handle result in a cell array too. | ||
30 | 92 | if length(objUnitsModified.(units{unitsIdx}).handles) == 1 | |
93 | objUnitsModified.(units{unitsIdx}).positions = {get(objUnitsModified.(units{unitsIdx}).handles,'Position')}; | ||
30 | 94 | else | |
30 | 95 | objUnitsModified.(units{unitsIdx}).positions = get(objUnitsModified.(units{unitsIdx}).handles,'Position'); | |
30 | 96 | end | |
30 | 97 | end | |
6 | 98 | end |
Other subfunctions in this file are not included in this listing.