matlab裡defaultuicontrolunits是什麼意思

2022-09-23 11:21:14 字數 988 閱讀 9224

1樓:開始驗證

建個m檔案,輸入以下**,試試看,調整一下大小,調整以下檔案,執行就可以了,不需要用新建gui的過程。。

clf reset % <1>

set(gcf,'unit','normalized','position',[0.1,0.4,0.85,0.35]);

set(gcf,'defaultuicontrolunits','normalized');

set(gcf,'defaultuicontrolfontsize',11);

set(gcf,'defaultuicontrolfontname','隸書');

set(gcf,'defaultuicontrolhorizontal','left');

set(gcf,'menubar','none');

str='調出指定**';

set(gcf,'name',str,'numbertitle','off');

h_axes=axes('position',[0.05,0.15,0.45,0.70],'visible','off');

hpush=uicontrol(gcf,'style','push',...

'position',[0.1,0.05,0.05,0.15],'string','**1');

set(hpush,'callback','axes(h_axes);b=imread(''f:\1.jpg'');imshow(b)');

h_axes2=axes('position',[0.55,0.15,0.4,0.70],'visible','off');

hpush2=uicontrol(gcf,'style','push',...

'position',[0.8,0.05,0.05,0.15],'string','**2');

set(hpush2,'callback','axes(h_axes2);a=imread(''f:\2.jpg'');imshow(a)');