
matlab的曲面拟合方程的问题 20
我用一组x,y,z的数据进行拟合,得到:LinearmodelPoly33:f(x,y)=p00+p10*x+p01*y+p20*x^2+p11*x*y+p02*y^2+...
我用一组x,y,z的数据进行拟合,得到:
Linear model Poly33:
f(x,y) = p00 + p10*x + p01*y + p20*x^2 + p11*x*y + p02*y^2 + p30*x^3 + p21*x^2*y
+ p12*x*y^2 + p03*y^3
where x is normalized by mean 47.5 and std 25.88
and where y is normalized by mean 1.375 and std 0.03183
Coefficients (with 95% confidence bounds):
p00 = 17.73 (17.73, 17.74)
p10 = 2.129 (2.124, 2.134)
p01 = 13.35 (13.34, 13.35)
p20 = 0.3665 (0.3644, 0.3686)
p11 = 0.6613 (0.6593, 0.6633)
p02 = 1.767 (1.764, 1.769)
p30 = -0.005877 (-0.008288, -0.003465)
p21 = 0.02908 (0.02693, 0.03122)
p12 = 0.2355 (0.2331, 0.238)
p03 = 0.7059 (0.7032, 0.7086)
Goodness of fit:
SSE: 0.0335
R-square: 1
Adjusted R-square: 1
RMSE: 0.01328
但是我套用公式后,再用相同的数据去验证,无论大的或小的数,带进去计算出来的z都比原来数据组中的z要大一些,请问这是怎么回事?我刚开始用,很多方面不太懂,能不能帮我看看怎么改进?谢谢 展开
Linear model Poly33:
f(x,y) = p00 + p10*x + p01*y + p20*x^2 + p11*x*y + p02*y^2 + p30*x^3 + p21*x^2*y
+ p12*x*y^2 + p03*y^3
where x is normalized by mean 47.5 and std 25.88
and where y is normalized by mean 1.375 and std 0.03183
Coefficients (with 95% confidence bounds):
p00 = 17.73 (17.73, 17.74)
p10 = 2.129 (2.124, 2.134)
p01 = 13.35 (13.34, 13.35)
p20 = 0.3665 (0.3644, 0.3686)
p11 = 0.6613 (0.6593, 0.6633)
p02 = 1.767 (1.764, 1.769)
p30 = -0.005877 (-0.008288, -0.003465)
p21 = 0.02908 (0.02693, 0.03122)
p12 = 0.2355 (0.2331, 0.238)
p03 = 0.7059 (0.7032, 0.7086)
Goodness of fit:
SSE: 0.0335
R-square: 1
Adjusted R-square: 1
RMSE: 0.01328
但是我套用公式后,再用相同的数据去验证,无论大的或小的数,带进去计算出来的z都比原来数据组中的z要大一些,请问这是怎么回事?我刚开始用,很多方面不太懂,能不能帮我看看怎么改进?谢谢 展开
1个回答
展开全部
一般来说,用拟合工具箱拟合出来的函数与实际是有差别的,因为拟合方程的系数是在95%置信水平下得到的。所以要得到拟合程度高的方程,可使用lsqcurvefit()或nlinfit( )函数来j得到。
追问
我发现主要的区别是由于小数点后位数太少造成的,我用excel算了其中部分参数后,代入就很接近了,比如mean和std就可以用excel来算,但是p参数这些没办法。matlab默认好像只显示4位数,不知道怎么样才能显示6位?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询