资源描述:
《粗大误差处理程序》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、粗大误差处理程序#include#include#includeinti,N;doublea[20],v[20],c,a1,a2,a3,k,g,r,r1,r2;voidlaiyite();voidroman();voidgeluobusi();voiddikesong();doubleaverage(doublearr[],intm);doublebzhch(doublearr1[],intm);voidkzhi(intn1);voidgzhi(intn2);voidrzhi(intn3,doublearr[],intn);voidma
2、in(){intn,w;printf("*****************************粗大误差处理****************************");printf("请输入数据个数:");scanf("%d",&N);printf("请?输?入?数簓据Y:");for(i=0;i3、则òttt3.格罗布斯准则ttt4.狄克松准则");printf("**********************************************************");printf("请选择判别的准则:[]bb");scanf("%d",&n);switch(n){case1:laiyite();break;case2:roman();break;case3:geluobusi();break;case4:dikesong();break;}printf("要继续吗t1.继续2.退出?[]bb");scanf("%d"
4、,&w);switch(w){case1:gotoS;break;case2:break;}}}voidlaiyite()//1.莱以特准则{doubleb;L1:{c=average(a,N);b=bzhch(a,N);for(i=0;i3*b){printf("剔除值残余误差:%8.3lf剔除值%8.3lf",v[i],a[i]);for(;i