This is a static copy of a profile report

Home

imuitools\private\constrainToWorkArea (1 call, 0.000 sec)
Generated 15-Mar-2007 12:02:06 using real time.
M-function in file C:\Program Files\MATLAB71\toolbox\images\imuitools\private\constrainToWorkArea.m
[Copy to new window for comparing multiple runs]

Parents (calling functions)

Function NameFunction TypeCalls
imuitools\private\initSizeM-function1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
20
left_correction = max(0, wa.le...
10.000 s34.3%
28
vertical_correction = bottom_c...
10.000 s26.0%
21
right_correction = max(0, (fig...
10.000 s18.2%
26
top_correction = max(0, (fig_o...
10.000 s10.4%
25
bottom_correction = max(0, wa....
10.000 s10.1%
Other lines & overhead  0 s0%
Totals  0.000 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
imuitools\private\getWorkAreaM-function10 s0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0.000 s100% 
M-Lint results
No M-Lint messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in file33
Non-code lines (comments, blank lines)21
Code lines (lines that can run)12
Code lines that did run12
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 function constrainToWorkArea(h_figure)
3 %constrainToWorkArea Shift figure to fit inside a screen's work area.
4 % constrainToWorkArea(h_figure) translates a figure horizontally and
5 % vertically if necessary to put the figure inside a screen's work
6 % area. On a PC running Windows, the work area is the region of the
7 % screen not obscured by the task bar. On other systems, the work area
8 % is the entire display.
9
10 % Copyright 1993-2005 The MathWorks, Inc.
11 % $Revision: 1.1.8.2 $ $Date: 2005/06/20 03:10:14 $
12
1 13 wa = getWorkArea;
14
1 15 old_units = get(h_figure, 'Units');
1 16 set(h_figure, 'Units', 'pixels');
17
1 18 fig_outer_position = get(h_figure, 'OuterPosition');
19
< 0.01 1 20 left_correction = max(0, wa.left - fig_outer_position(1));
< 0.01 1 21 right_correction = max(0, (fig_outer_position(1) - left_correction + ...
22 fig_outer_position(3)) - wa.right);
< 0.01 1 23 horizontal_correction = left_correction - right_correction;
24
< 0.01 1 25 bottom_correction = max(0, wa.bottom - fig_outer_position(2));
< 0.01 1 26 top_correction = max(0, (fig_outer_position(2) - bottom_correction + ...
27 fig_outer_position(4)) - wa.top);
< 0.01 1 28 vertical_correction = bottom_correction - top_correction;
29
1 30 set(h_figure, 'Position', get(h_figure, 'Position') + ...
31 [horizontal_correction vertical_correction 0 0]);
32
1 33 set(h_figure, 'Units', old_units);