资 源 简 介
//=== === === === === === === =
//函数说明
//函数名称:PolyFit
//函数功能:最小二乘法曲线拟合
//使用方法:double *x ---- 存放n个数据点的X坐标
// double *y ---- 存放n个数据点的Y坐标
// int n -------- 给定数据点个数
// double *a ---- 返回m-1次拟合多项式的m个系数
// int m -------- 拟合多项式的项数,即拟合多项式的最高次为m-1。要求m<=n,且
// m<=20。若m>n或m>20,则本函数自动按m=min{n,20}处理
// double *dt --- dt[0]返回拟合多项式与各数据点误差的平方和;dt[1]返回拟合多
// 项式与各数据点的误差绝对值之和;dt[2]返回拟合多项式与各数据
// 点误差绝对值的最大值
//注意事项:拟合多项式的形式为 y = b0 + b1*(x-Xavr)...
-//=== === === === === ==== === === === === === === ==== === =// function annotations// function name : PolyFit// Function functions : Least Squares Curve Fitting// Use : double* x n-store data point coordinates of the X//* y double-storage n data point Y coordinates// int n-------- given the number of data points//* a double---- returned to the m-1 m fit polynomial coefficients// int m-------- polynomial fitting items , which is the highest polynomial fitting time for m-1. Request m