- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
最小二乘法曲线拟合代码(Least squares curve fitting code)
最小二乘法曲线拟合代码(Least squares curve fitting code) / / the least squares curve fitting //x double precision solid one-dimensional array, length of N, store a given n data points, x coordinates //y double precision solid one-dimensional array, length of N, store a given n data points, y coordinates //n shaping variables, the number of data points given //a double precision real one-dimensional array, length m, return m - 1 times the M coefficients of the polynomial //m the number of integer variables and polynomial, m20 and m n. //dt double precision real one-dimensional array, length 3, dt[0], return the sum of pseudo polynomial and data point error sum //dt[1] returns the sum of the absolute values of the pseudo polynomial and the data point error, and dt[2] returns the maximum of the absolute value of the pseudo polynomial and the data point error #include math.h Void, hpir1 (double, *x, double, *y, int, N, double, *a, int, m, double, *dt) Int / N, m; X[] y[] / / double, a[], dt[]; {int, I, J, k; Double, Z, P, C, G, Q, D1, D2, s[20], t[20], b[20]; For (i=0; i=m-1; i++) a[i]=0.0; If (mn) m=n; If (m20) m=20; Z=0.0; For (i=0; i=n-1; i++) z=z+x[i]/ (1.0*n); B[0]=1.0; d1=1.0*n; p=0.0; c=0.0; For (i=0; i=n-1; i++) {p=p+ (x[i]-z); c=c+y[i];} C=c/d1; p=p/d1; A[0]=c*b[0]; If (m1) {t[1]=1.0; t[0]=-p; D2=0.0; c=0.0; g=0.0; For (i=0; i=n-1; i++) {q=x[i]-z-p; d2=d2+q*q; C=c+y[i]*q; G=g+ (x[i]-z) *q*q; } C=c/d2; p=g/d2; q=d2/d1; D1=d2; A[1]=c*t[1]; a[0]=c*t[0]+a[0]; } For (j=2; j=m-1; j++) {s[j]=t[j-1]; S[j-1]=-p*t[j-1]+t[j-2]; If (j=3) For (k=j-2; k=1; k--) S[k]=-p*t[k]+t[k-1]-q*b[k]; S[0]=-p*t[0]-q*b[0]; 2=0;c=0;g=0; 对于(i = 0;i = n-1;i +) {; 为(k = J-1;K>=0;K) q = q(x [ i - z ]); q=q; G=(x,i)- q; } C = D2; D1=D2; a; 为(k = J-1;K>=0;K) {; b; } } dt [ 0 ] = 0;dt [ 1 ] = 0;dt [ 2 ] = 0; 对于(i = 0;i = n-1;i +) { Q =一个[ 1 ]; 为(k = m-2;K>=0;K) q =(q); P = q-y [我]; 如果(晶圆厂(P) DT [ 2 ] [ 2 ])DT =晶圆厂(P); dt [ 0 ] = dt [ 0 ] + P * P; DT [ 1 ] = dt [ 1 ] +工厂(P); } 返回; }
您可能关注的文档
- 德拉吉抛直接货币交易计划(Delagi O direct money exchange program).doc
- 心灵成长(Spiritual growth).doc
- 心理测试(Psychological test).doc
- 心系祖国,奉献青春(The heart of the motherland, dedication youth).doc
- 心理负荷的测量方法(Measurement of psychological load).doc
- 必知的知识(You must know knowledge).doc
- 心理发展的关键期(Critical period of psychological development).doc
- 微处理器控制器(mpumcu)设计 指纹传感器芯片fcd4b14 …(Microprocessor controller (mpumcu) Design fingerprint sensor chip fcd4b14...).doc
- 快消品营销方案(FMCG marketing program).doc
- 快乐小财女的理财必修课(A financial lesson for happy, small fortune women).doc
- 最健康的一天什么样(What's the healthiest day like).doc
- 必威体育精装版【让你的声音变得优美动听】魅力讲师班 财富女人学院(The latest [to make your voice beautiful] charm lecturer class wealth women's College).doc
- 必威体育精装版业务员培训资料(Latest salesman training materials).doc
- 必威体育精装版北京房产消息一部分楼盘曲线涨价 6月份将迎供应高峰(The latest Beijing property news, part of the property curve price in June will meet the peak supply).doc
- 必威体育精装版各板块龙头股(The latest leading shares of each sector).doc
- 最完整的三国刘备传秘籍(包括全宝物获得方法)(The most complete three kingdoms Liu Bei biography (including all treasure acquisition methods)).doc
- 必威体育精装版工程预算复习资料(Latest project budget review information).doc
- 必威体育精装版新闻(The latest news).doc
- 必威体育精装版的新闻评论423(The latest news review 423).doc
- 必威体育精装版高考满分作文精选(九)(Selected compositions of the latest college entrance examination (nine)).doc
文档评论(0)