?? exm8.m
字號(hào):
clear
clc
hf=figure('Position',[200 200 600 400] ,...
'Name','Uicontrol1' ,...
'NumberTitle','off');
ha=axes('Position',[0.4 0.1 0.5 0.7],...
'Box','on');
hbSin=uicontrol(hf,...
'Style','pushbutton',...
'Position',[50,140,100,30],...
'String','Plot sin(x)',...
'CallBack',...
['subplot(ha);'...
'x=0:0.1:4*pi;'...
'plot(x,sin(x));'...
'axis([0 4*pi -1 1]);'...
'xlabel(''x'');'...
'ylabel(''y=sin(x)'');'...
'if get(hcGrid,''Value'')==1;'... % add
'grid on;'...
'else;'...
'grid off;'...
'end;'...
]);
hbCos=uicontrol(hf,...
'Style','pushbutton',...
'Position',[50,100,100,30],...
'String','Plot cos(x)',...
'CallBack',...
['subplot(ha);'...
'x=0:0.1:4*pi;'...
'plot(x,cos(x));'...
'axis([0 4*pi -1 1]);'...
'xlabel(''x'');'...
'ylabel(''y=cos(x)'');'...
'if get(hcGrid,''Value'')==1;'... % add
'grid on;'...
'else;'...
'grid off;'...
'end;'...
]);
hbClose=uicontrol(hf,...
'Style','pushbutton',...
'Position',[50,60,100,30],...
'String','Exit',...
'CallBack','close(hf)');
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -