显示当前时间的表
萝卜@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
百纵科技:美国高防服务器,洛杉矶C3机房 独家接入zenlayer清洗 带金盾硬防,CPU全系列E52670、E52680v3 DDR4内存 三星固态盘阵列!带宽接入了cn2/bgp线路,速度快,无需备案,非常适合国内外用户群体的外贸、搭建网站等用途。C3机房,双程CN2线路,默认200G高防,3+1(高防IP),不限流量,季付送带宽美国洛杉矶C3机房套餐处理器内存硬盘IP数带宽线路防御价格/月套...
国庆钜惠 最低5折起 限量促销CYUN专注海外精品服务器资源,主营香港CN2 GIA、美国CERA、美国高防服务器资源,实体公司,ISP/IDC资质齐全,客服配备齐全。本次针对国庆推出非常给力的促销活动,旗下所有平台同享,新老客户同享,限时限量,售完截止。活动截止时间:2021年10月9日官网地址:www.cyun.net参与机型:香港CN2 GIA云服务器、香港双程CN2云服...
轻云互联成立于2018年的国人商家,广州轻云互联网络科技有限公司旗下品牌,主要从事VPS、虚拟主机等云计算产品业务,适合建站、新手上车的值得选择,香港三网直连(电信CN2GIA联通移动CN2直连);美国圣何塞(回程三网CN2GIA)线路,所有产品均采用KVM虚拟技术架构,高效售后保障,稳定多年,高性能可用,网络优质,为您的业务保驾护航。活动规则:用户购买任意全区域云服务器月付以上享受免费更换IP服...