?? shili64.m
字號(hào):
h0=figure('toolbar','none',...
'position',[200 150 300 150],...
'name','實(shí)例64');
now=fix(clock);
e1=uicontrol('parent',h0,...
'units','points',...
'tag','e1',...
'style','edit',...
'backgroundcolor',[1 1 1],...
'horizontal','right',...
'fontsize',12,...
'position',[20 80 30 20],...
'string',num2str(now(1)));
t1=uicontrol('parent',h0,...
'units','points',...
'tag','t1',...
'style','text',...
'string','年',...
'backgroundcolor',[0.75 0.75 0.75],...
'fontsize',14,...
'position',[55 80 20 20]);
e2=uicontrol('parent',h0,...
'units','points',...
'tag','e2',...
'style','edit',...
'backgroundcolor',[1 1 1],...
'horizontal','right',...
'fontsize',12,...
'position',[80 80 30 20],...
'string',num2str(now(2)));
t2=uicontrol('parent',h0,...
'units','points',...
'tag','t2',...
'style','text',...
'string','月',...
'backgroundcolor',[0.75 0.75 0.75],...
'fontsize',14,...
'position',[115 80 20 20]);
e3=uicontrol('parent',h0,...
'units','points',...
'tag','e3',...
'style','edit',...
'horizontal','right',...
'backgroundcolor',[1 1 1],...
'fontsize',12,...
'position',[140 80 30 20],...
'string',num2str(now(3)));
t3=uicontrol('parent',h0,...
'units','points',...
'tag','t3',...
'style','text',...
'string','日',...
'backgroundcolor',[0.75 0.75 0.75],...
'fontsize',14,...
'position',[175 80 20 20]);
e4=uicontrol('parent',h0,...
'units','points',...
'tag','e4',...
'style','edit',...
'backgroundcolor',[1 1 1],...
'horizontal','right',...
'fontsize',12,...
'position',[20 30 100 20],...
'string',[num2str(now(4)),':',num2str(now(5)),':',num2str(now(6))]);
b1=uicontrol('parent',h0,...
'units','points',...
'tag','b1',...
'style','pushbutton',...
'backgroundcolor',[0.75 0.75 0.75],...
'string','關(guān)閉',...
'fontsize',12,...
'position',[150 30 50 20],...
'callback',[...
'k=1;,',...
'close']);
k=0;
while find(get(0,'children'))==h0
now1=fix(clock)
set(e1,'string',num2str(now1(1)));
set(e2,'string',num2str(now1(2)));
set(e3,'string',num2str(now1(3)));
set(e4,'string',[num2str(now1(4)),':',num2str(now1(5)),':',num2str(now1(6))]);
pause(1)
if k==1
break
end
end
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -