显示当前时间的表
萝卜@2005-04-2720:01
%显示当前时间的表t ryclose allh fi g=fi g u re;set(hfig, 'Num berTitle','off');set(hfig, 'nam e','显示当前时间的表');set(hfig, 'MenuBar' ,'none');s et(hfig, 'color',[050703])
A=l inspace(0,63,1000);x1=8*cos(A);y1=8*sin(A);x2=7*cos(A);y2=7*sin(A);plot(x1 ,y1 , 'b' ,'l inewidth',14)holdonplot(x2,y2, 'b','l inewidth',35)fi l l(04*cos(A),04*s in(A),'r');axis offaxis([-1010-1010])axis equalset(gca, 'position' ,[[01300507750815]])ti tl e(d ate, 'fo n ts i ze' ,18)fork=1 :12;xk=9*cos(-2*pi/12*k+pi/2);yk=9*s in(-2*pi/12*k+pi/2);plot([xk/9*8xk/9*7],[yk/9*8yk/9*7],'color',[030809])% if kh=te xt(xk,yk,n u m 2s tr(k),'fo n ts i ze',16, 'co l o r' ,
[090308],'HorizontalAl ignment','center');end
%计算时针位置ti=clock;th=-(ti(4)+ti(5)/60+ti(6)/3600)/12*2*pi+pi/2;xh 3=40*cos(th);yh3=40*sin(th);xh2=xh3/2+05*cos(th-pi/2);yh2=yh3/2+05*sin(th-pi/2);
xh4=xh3/2-05*cos(th-pi/2);yh4=yh3/2-05*sin(th-pi/2);hh=fi l l([0xh2xh3xh40], [0yh2yh3yh40], [060503]);
%计算分针位置tm=-(ti(5)+ti(6)/60)/60*2*pi+pi/2;xm 3=60*cos(tm);ym3=60*sin(tm);xm 2=xm 3/2+05*cos(tm-p i/2);ym2=ym3/2+05*sin(tm-pi/2);xm 4=xm 3/2-05*cos(tm-p i/2);ym4=ym3/2-05*sin(tm-pi/2);hm=fil l([0xm2xm3xm40],[0ym2ym3ym40],[060503]);%计算秒针位置ts=-(ti(6))/60*2*p i+pi/2;hs=plot([07*cos(ts)],[07*s in(ts)],
'color' ,[060503] ,'l inewidth',3);set(gcf,'doublebuffer','on');k=1 ;whi lek<6;ti=clock;
%计算时针位置th=-(ti(4)+ti(5)/60+ti(6)/3600)/12*2*pi+pi/2;xh 3=40*cos(th);yh3=40*sin(th);xh2=xh3/2+05*cos(th-pi/2);yh2=yh3/2+05*sin(th-pi/2);xh4=xh3/2-05*cos(th-pi/2);yh4=yh3/2-05*sin(th-pi/2);set(hh,'XData' ,[0 xh2 xh3 xh40],'YData' ,[0 yh2 yh3 yh40])%计算分针位置tm=-(ti(5)+ti(6)/60)/60*2*pi+pi/2;xm 3=60*cos(tm);ym3=60*sin(tm);xm 2=xm 3/2+05*cos(tm-p i/2);ym2=ym3/2+05*sin(tm-pi/2);xm 4=xm 3/2-05*cos(tm-p i/2);ym4=ym3/2-05*sin(tm-pi/2);set(hm,'XData',[0xm2xm3xm40],'YData', [0ym2ym3ym40])%计算秒针位置
ts=-(ti(6))/60*2*p i+pi/2;set(hs,'XData' ,[07*cos(ts)], 'YData',[07*sin(ts)])drawnow;pause(009)endcatchend
优惠码年付一次性5折优惠码:TYO-Lite-Open-Beta-1y-50OFF永久8折优惠码:TYO-Lite-Open-Beta-Recur-20OFF日本vpsCPU内存SSD流量带宽价格购买1核1.5G20 GB4 TB1Gbps$10.9/月购买2核2 G40 GB6 TB1Gbps$16.9/月购买2核4 G60 GB8 TB1Gbps$21.9/月购买4核4 G80 GB12 TB...
LOCVPS商家我们还是比较熟悉的老牌的国内服务商,包括他们还有其他的产品品牌。这不看到商家的信息,有新增KVM架构轻量/迷你套餐,提供的机房包括香港云地和美国洛杉矶,适用全场8折优惠,月付29.6元起。LOCVPS是一家成立于2011年的稳定老牌国人商家,主要从事XEN、KVM架构的国外VPS销售,主推洛杉矶MC、洛杉矶C3、香港邦联、香港沙田电信、香港大埔、日本东京、日本大阪、新加坡等数据中心...
BuyVM测评,BuyVM怎么样?BuyVM好不好?BuyVM,2010年成立的国外老牌稳定商家,Frantech Solutions旗下,主要提供基于KVM的VPS服务器,数据中心有拉斯维加斯、纽约、卢森堡,付费可选强大的DDOS防护(月付3美金),特色是1Gbps不限流量,稳定商家,而且卢森堡不限版权。1G或以上内存可以安装Windows 2012 64bit,无需任何费用,所有型号包括免费的...