?? shili41.m
字號(hào):
h=figure('toolbar','none',...
'position',[200 150 450 250],...
'name','實(shí)例41');
h1=uicontrol(gcf,'style','edit',...
'position',[80 200 100 20],...
'HorizontalAlignment','right',...
'callback',['m=get(h1,''string'');,',...
'a=str2num(m);']);
h2=uicontrol(gcf,'style','edit',...
'HorizontalAlignment','right',...
'position',[80 150 100 20],...
'callback',['n=get(h2,''string'');,',...
'b=str2num(n);']);
h3=uicontrol(gcf,'style','text',...
'string','被除數(shù)',...
'position',[80 230 100 20]);
h4=uicontrol(gcf,'style','edit',...
'position',[80 50 100 20]);
h5=uicontrol(gcf,'style','pushbutton',...
'position',[80 100 100 20],...
'string','=',...
'callback',[...
'if b==0,',...
'h7=errordlg(''除數(shù)不能為0!'',''error'',''on'');,',...
'else,',...
'k=a/b;,',...
'c=num2str(k);,',...
'set(h4,''string'',c),',...
'end']);
h8=uicontrol(gcf,'style','text',...
'string','除數(shù)',...
'position',[80 175 100 20]);
h9=uicontrol(gcf,'style','text',...
'string','商',...
'position',[80 75 100 20]);
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -