显示当前时间的表
萝卜@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
全球独立服务器、站群多IP服务器、VPS(哪个国家都有),香港、美国、日本、韩国、新加坡、越南、泰国、加拿大、英国、德国、法国等等99元起步,湘南科技郴州市湘南科技有限公司官方网址:www.xiangnankeji.cn产品内容:全球独立服务器、站群多IP服务器、VPS(哪个国家都有),香港、美国、日本、韩国、新加坡、越南、泰国、加拿大、英国、德国、法国等等99元起步,湘南科技VPS价格表:独立服...
Hostodo近日发布了美国独立日优惠促销活动,主要推送了四款特价优惠便宜的VPS云服务器产品,基于KVM虚拟架构,NVMe阵列,1Gbps带宽,默认分配一个IPv4+/64 IPv6,采用solusvm管理,赠送收费版DirectAdmin授权,服务有效期内均有效,大致约为7折优惠,独立日活动时间不定,活动机型售罄为止,有需要的朋友可以尝试一下。Hostodo怎么样?Hostodo服务器好不好?...
ftech怎么样?ftech是一家越南本土的主机商,成立于2011年,比较低调,国内知道的人比较少。FTECH.VN以极低的成本提供高质量服务的领先提供商之一。主营虚拟主机、VPS、独立服务器、域名等传统的IDC业务,数据中心分布在河内和胡志明市。其中,VPS提供1G的共享带宽,且不限流量,还可以安装Windows server2003/2008的系统。Ftech支持信用卡、Paypal等付款,但...