This is a static copy of a profile report

Home

convertUnits (Calls: 368, Time: 0.056 s)
Generated 16-Jul-2020 17:09:01 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/matlab/graphics/+matlab/+graphics/+internal/convertUnits.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
...tManager.updateStartingLayoutPositionclass method92
...Manager>AxesLayoutManager.doUpdateclass method230
...er.AxesLayoutManager>isNearlyEqualclass method46
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
10
viewport.Units = fromunits;
3680.037 s66.0%
11
viewport.Position = frompos;
3680.006 s10.3%
14
viewport.Units = tounits;
3680.006 s10.2%
17
topos = viewport.Position;
3680.004 s6.3%
19
end
3680.002 s4.3%
All other lines  0.002 s3.0%
Totals  0.056 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function19
Non-code lines (comments, blank lines)14
Code lines (lines that can run)5
Code lines that did run5
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
time 
Calls 
 line
   1 
function topos = convertUnits(viewport, tounits, fromunits, frompos)
   2 
% This is an undocumented function and may be removed in a future release.
   3 

   4 
% Use the matlab.graphics.general.UnitPosition object "viewport" to convert
   5 
% the units of "frompos" from "fromunits" to "tounits".
   6 

   7 
%   Copyright 2018 The MathWorks, Inc.
   8 

   9 
% Set the 'Units' and 'Position' to the starting units and position.
  0.037 
    368 
  10
viewport.Units = fromunits; 
  0.006 
    368 
  11
viewport.Position = frompos; 
  12 

  13 
% Set the 'Units' to the new units, this will trigger a unit conversion.
  0.006 
    368 
  14
viewport.Units = tounits; 
  15 

  16 
% Read back the new position in the new units.
  0.004 
    368 
  17
topos = viewport.Position; 
  18 

  0.002 
    368 
  19
end 

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