1 %常用对象的属性 2 3 %1.figure 4 %hf=figure; 5 %get(hf); 6 7 %改变颜色 set Color 8 %set(hf,'Color','w'); 9 10 %去掉默认的菜单 Menubar 11 %set(hf,'Menubar','none'); 12 13 %设置名字 14 %set(hf,'NumberTitle','off','name','test'); 15 16 %改变大小 ReSize off(不能改变窗口大小) on(可以改变窗口大小) 17 %set(hf,'ReSize','off'); 18 19 %设置可见与不可见 20 %pause(3) %停留三秒 21 %set(hf,'Visible','off'); 22 %pause(3) 23 %set(hf,'Visible','on'); 24 25 %只有按界面内才会响应操作 其它地方不会响应其它窗口 26 %set(hf,'WindowStyle','modal'); 27 28 %随意按下一个键关闭界面 29 %set(hf,'WindowKeyPressFcn','closereq'); 30 31 %点击窗口时关闭界面 32 %set(hf,'WindowButtonDownFcn', 'closereq'); 33 34 %closereq 关闭界面 35 %hb = uicontrol('Style','pushbutton','Callback','closereq'); 36 37 38 %2.axes 39 % ha=axes; 40 % get(ha) 41 42 % 试多条曲线同时存在 43 % set(ha,'NextPlot','add'); 44 45 % plot([0:100]); 46 47 % plot([sin(0:0.01:3)]);