x=0;for (gd=0;gd<10;gd++) x=x+zs0[xz+gd+1][4];x=x/10.0; setcolor(0);outtextxy(135,2,"圹圹圹?);setcolor(13);outtextxy(95,2,"10PM"); gcvt((double)x/100.,5,chh);outtextxy(135,2,chh); x=0;for (gd=0;gd<20;gd++) x=x+zs0[xz+gd+1][4];x=x/20.0; setcolor(0);outtextxy(220,2,"圹圹圹?);setcolor(9);outtextxy(185,2,"20PM"); gcvt((double)x/100.,5,chh);outtextxy(220,2,chh); x=0;for (gd=0;gd<30;gd++) x=x+zs0[xz+gd+1][4];x=x/30.0; setcolor(0);outtextxy(310,2,"圹圹圹?);setcolor(2);outtextxy(275,2,"30PM"); gcvt((double)x/100.,5,chh);outtextxy(310,2,chh); x=0;for (gd=0;gd<75;gd++) x=x+zs0[xz+gd+1][4];x=x/75.0; setcolor(0);outtextxy(405,2,"圹圹圹?);setcolor(6);outtextxy(365,2,"75PM"); gcvt((double)x/100.,5,chh);outtextxy(405,2,chh); x=0;for (gd=0;gd<150;gd++) x=x+zs0[xz+gd+1][4];x=x/150.0; setcolor(0);outtextxy(500,2,"圹圹圹?);setcolor(7);outtextxy(455,2,"150PM"); gcvt((double)x/100.,5,chh);outtextxy(500,2,chh); x=0;for (gd=0;gd<5;gd++) x=x+zs0[xz+gd][4];x=x/5.0;//移动平均线 setcolor(0);outtextxy(45,2,"圹圹圹?);setcolor(14);outtextxy(5,2,"5PMA"); gcvt((double)x/100.,5,chh);outtextxy(45,2,chh); y=0;for (gd=0;gd<10;gd++) y=y+zs0[xz+gd][4];y=y/10.0; setcolor(0);outtextxy(135,2,"圹圹圹?);setcolor(13);outtextxy(95,2,"10PM"); gcvt((double)y/100.,5,chh);outtextxy(135,2,chh); // cprintf("%f",(float)max(x,y)/min(x,y)); x=0;for (gd=0;gd<20;gd++) x=x+zs0[xz+gd][4];x=x/20.0; setcolor(0);outtextxy(220,2,"圹圹圹?);setcolor(9);outtextxy(185,2,"20PM"); gcvt((double)x/100.,5,chh);outtextxy(220,2,chh); x=0;for (gd=0;gd<30;gd++) x=x+zs0[xz+gd][4];x=x/30.0; setcolor(0);outtextxy(310,2,"圹圹圹?);setcolor(2);outtextxy(275,2,"30PM"); gcvt((double)x/100.,5,chh);outtextxy(310,2,chh); x=0;for (gd=0;gd<75;gd++) x=x+zs0[xz+gd][4];x=x/75.0; setcolor(0);outtextxy(405,2,"圹圹圹?);setcolor(6);outtextxy(365,2,"75PM"); gcvt((double)x/100.,5,chh);outtextxy(405,2,chh); x=0;for (gd=0;gd<150;gd++) x=x+zs0[xz+gd][4];x=x/150.0; setcolor(0);outtextxy(500,2,"圹圹圹?);setcolor(7);outtextxy(455,2,"150PM"); gcvt((double)x/100.,5,chh);outtextxy(500,2,chh); x=0;for (gd=0;gd<5;gd++) x=x+cjl0[xz+gd];x=x/5; //移动平均量 setcolor(0);outtextxy(100,222,"圹圹圹圹圹?);setcolor(14);outtextxy(40,222,"5PMV"); ltoa(x,chh,10);outtextxy(100,222,chh); x=0;for (gd=0;gd<10;gd++) x=x+cjl0[xz+gd];x=x/10; setcolor(0);outtextxy(250,222,"圹圹圹圹圹?);setcolor(13);outtextxy(190,222,"10PMV"); ltoa(x,chh,10);outtextxy(250,222,chh); // if (zb==1) { ls=75;cz=xz+1;zz=0.000000000; for (j=cz;j<cz+ls;j++) { bb=0.00000000000;for (i=0;i<ls;i++) bb=bb+(double)zs0[j+i][4]/(double)ls;//bb=(double)bb/(double)ls; zz=zz+((double)zs0[j][4]-bb)*((double)zs0[j][4]-bb); }zz=sqrt((double)zz/ls); bb=0.0000000000;for (i=0;i<ls;i++) bb=bb+(double)zs0[cz+i][4]/(double)ls;//bb=(double)bb/ls; xx=bb+boll_g*zz;yy=bb-boll_g*zz; setcolor(0);outtextxy(60,302,"圹圹圹圹圹圹圹");setcolor(15); outtextxy(60,302,"UP:");gcvt((double)xx/100.,5,chh);outtextxy(100,302,chh); setcolor(0);outtextxy(190,302,"圹圹圹圹圹圹圹");setcolor(14); outtextxy(190,302,"MD:");gcvt((double)bb/100.,5,chh);outtextxy(230,302,chh); setcolor(0);outtextxy(320,302,"圹圹圹圹圹圹圹");setcolor(2); outtextxy(320,302,"DN:");gcvt((double)yy/100.,5,chh);outtextxy(360,302,chh); } if (zb==0) { if (key==75&&xz>1) {zz=(zz*10.0-(xx-yy)*2.0)/8.0; xx=(xx*13.0-zs0[xz-1][4]*2.0)/11.0;yy=(yy*27.0-zs0[xz-1][4]*2.0)/25.0; bb=(xx-yy-zz)*2.0; } if (key==77&&done==0) { xx=(xx*11.0+zs0[xz][4]*2.0)/13.0; yy=(zs0[xz][4]*2.0+yy*25.0)/27.0;zz=(zz*8.0+(xx-yy)*2.0)/10.0; bb=(xx-yy-zz)*2.0; } setcolor(0);outtextxy(60,302,"圹圹圹圹圹圹圹圹圹圹");setcolor(15); outtextxy(60,302,"DIF:");gcvt((double)(xx-yy),5,chh);outtextxy(100,302,chh); setcolor(0);outtextxy(190,302,"圹圹圹圹圹圹圹圹圹圹");setcolor(14); |