?? exm10.m
字號:
clear
clc
ha=axes('Position',[0.4 0.1 0.5 0.7],...
'Box','on');
hbSin=uicontrol(hf,...
'Style','pushbutton',... %sin按鈕
'Position',[50,120,100,30],...
'String','Plot sin(x)',...
'CallBack',...
['subplot(ha);'...
'x=0:0.1:4*pi;'...
'plot(x,sin(x));'... %繪制sin曲線
'axis([0 4*pi -1 1]);'...
'grid on;'...
'xlabel(''x'');'...
'ylabel(''y=sin(x)'');'...
]);
hbClose=uicontrol(hf,...
'Style','pushbutton',... %關閉按鈕
'Position',[50,70,100,30],...
'String','Exit',...
'CallBack','close(hf)');
hfr=uicontrol(gcf,'Style','frame',... %框架
'Position',[48 178 104 58]); %框架位置
hf=figure('Position',[200 200 600 400] ,...
'Name','Uicontrol1' ,...
'NumberTitle','off');
hrboxoff=uicontrol(gcf,'Style','radio',... %單選按鈕off
'Position',[50 180 100 20],...
'String','Set box off',...
'Value',0,...
'CallBack',[...
'set(hrboxon,''Value'',0);'...
'set(hrboxoff,''Value'',1);'...
'set(gca,''Box'',''off'');']);
hrboxon=uicontrol(gcf,'Style','radio',... %單選按鈕on
'Position',[50 210 100 20],...
'String','Set box on',...
'Value',1,...
'CallBack',[...
'set(hrboxon,''Value'',1);'...
'set(hrboxoff,''Value'',0);'...
'set(gca,''Box'',''on'');']);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -