1、get

scrsz = get(0,'ScreenSize');    %显示电脑的分辨率,


每台计算机,句柄的根对象只有一个,就是屏幕,它的句柄总是0


ScreenSize is 四维向量: [left, bottom, width, height]。


例如:

>> scrsz = get(0,'ScreenSize')

scrsz =
          1           1        1280         800
1280和800就是设置的计算机的分辨率,注意:更改分辨率的设置,需重启计算机

才能生效。scrsz(4)就是800,scrsz(3)就是1280


2、figure

设置figure的大小为1/4显示器大小并置于左上方:
figure('Position', [1 scrsz(4)/2 scrsz(3)/2 scrsz(4)/2] )

Figure OuterPosition属性包括title bar, menu bar, tool bars, and outer edges.

Figure Position属性不包括title bar, menu bar, tool bars, and outer edges

set(0,'HideUndocumented','off')
>> get(gcf)
...
Position = [360 278 560 420]
...
OuterPosition = [352 270 576 511]
...
设置坐标轴的位置Axes的OuterPositio属性包括axis labels, title, and a margin,对于只有一个axes对象的figure,就是figure的内部
Axes的Position属性就是axes的边界以内不包括the tick marks and labels, title, and axis labels
Axesde TightInset属性就是axes的text labels, title, and axis labels.和axes边界之间的空白距离
set(gco,'Units','pixels')
get(gco)
...
OuterPosition = [1 1 560 420]
...
Position = [73.8 47.2 434 342.3]
...
TightInset = [22 17 5 8]


修改自:http://blog.csdn.net/lulubooboo/article/details/7313600