Labfans是一个针对大学生、工程师和科研工作者的技术社区。 论坛首页 | 联系我们(Contact Us)
MATLAB爱好者论坛-LabFans.com
返回   MATLAB爱好者论坛-LabFans.com > 工程数学软件 > MATLAB论坛
MATLAB论坛 一切MATLAB相关问题在此讨论。
回复
 
主题工具 显示模式
旧 2011-05-09, 15:52   #1
yanzhaolun
初级会员
 
注册日期: 2011-04-29
帖子: 6
声望力: 0
yanzhaolun 正向着好的方向发展
默认 polyfit结果是什么意思

我用polufit算出结果中有df:和nor
不知道它们怎么用
yanzhaolun 当前离线   回复时引用此帖
旧 2011-05-09, 16:01   #2
yhcode
高级会员
 
注册日期: 2008-05-13
年龄: 44
帖子: 232
声望力: 21
yhcode 正向着好的方向发展
默认 回复: polyfit结果是什么意思

Matlab Help中对polyfit的说明很详细:
p = polyfit(x,y,n) finds the coefficients of a polynomial p(x) of degree n that fits the data, p(x(i)) to y(i), in a least squares sense. The result p is a row vector of length n+1 containing the polynomial coefficients in descending powers

[p,S] = polyfit(x,y,n) returns the polynomial coefficients p and a structure S for use with polyval to obtain error estimates or predictions. Structure S contains fields R, df, and normr, for the triangular factor from a QR decomposition of the Vandermonde matrix of X, the degrees of freedom, and the norm of the residuals, respectively. If the data Y are random, an estimate of the covariance matrix of P is (Rinv*Rinv')*normr^2/df, where Rinv is the inverse of R. If the errors in the data y are independent normal with constant variance, polyval produces error bounds that contain at least 50% of the predictions.

[p,S,mu] = polyfit(x,y,n) finds the coefficients of a polynomial in

where and . mu is the two-element vector . This centering and scaling transformation improves the numerical properties of both the polynomial and the fitting algorithm.
你所说的df和nor我不清楚是什么,实际上这个函数的目的就是用多项式模型对实际数据(x,y)进行拟合,拟合的结果是多项式各项的系数,当然还可给出拟合后数据的方差和期望等信息
__________________
工科'985'博士,(图像处理、分析及理解;模式识别;运动估计;数据分析等)定做程序、算法实现--qq:752105755
yhcode 当前离线   回复时引用此帖
回复

主题工具
显示模式

发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码



所有时间均为北京时间。现在的时间是 22:17


Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.