Whatever units you use, it is important to know the extent of the screen in those units. You can obtain this information from the root ScreenSize property. For example,
get(0,'ScreenSize')
ans =
1 1 1152 900
In this case, the screen is 1152 by 900 pixels. MATLAB returns the ScreenSize in the units determined by the root Units property. For example,
set(0,'Units','normalized')
normalizes the values returned by ScreenSize.
get(0,'ScreenSize')
ans =
0 0 1 1
Defining the figure Position in terms of the ScreenSize in normalized units makes the specification independent of variations in screen size. This is useful if you are writing an M-file that is to be used on different computer systems.作者: 驴子 时间: 2007-1-22 17:51