This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
20 | left_correction = max(0, wa.le... | 1 | 0.000 s | 34.3% |  |
28 | vertical_correction = bottom_c... | 1 | 0.000 s | 26.0% |  |
21 | right_correction = max(0, (fig... | 1 | 0.000 s | 18.2% |  |
26 | top_correction = max(0, (fig_o... | 1 | 0.000 s | 10.4% |  |
25 | bottom_correction = max(0, wa.... | 1 | 0.000 s | 10.1% |  |
Other lines & overhead | | | 0 s | 0% |  |
Totals | | | 0.000 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
imuitools\private\getWorkArea | M-function | 1 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0 s | 0% |  |
Totals | | | 0.000 s | 100% | |
M-Lint results
No M-Lint messages.Coverage results
[ Show coverage for parent directory ]
Total lines in file | 33 |
Non-code lines (comments, blank lines) | 21 |
Code lines (lines that can run) | 12 |
Code lines that did run | 12 |
Code lines that did not run | 0 |
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);