作业帮 > 综合 > 作业

怎么用MATLAB建立数据间的函数关系

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/11/06 03:35:54
怎么用MATLAB建立数据间的函数关系
我知道了 X,Y,Z和W的数据,根据数据生成W用X,Y,Z的表达式还有图形,最好有教程,谢谢!
可以使用Matlab自带的sftool工具箱,来拟合.举例说明其求解方法:
在命令窗口下,输入
>> x=[565.454 562.058 561.39 563.782 567.941 571.255 571.938 569.5];
>> y=[528.012 525.544 521.447 518.108 517.407 519.857 523.953 527.356];
>> z=[1.792 1.818 1.783 1.769 1.772 1.77 1.794 1.794];
>> sftool
选择“Polynomia”l项,x的Degrees为1,y的Degrees为3
在Results窗口就会出现,你要的结果.
Linear model Poly13:
     f(x,y) = p00 + p10*x + p01*y + p11*x*y + p02*y^2 + p12*x*y^2 + p03*y^3
       where x is normalized by mean 566.7 and std 4.095
       and where y is normalized by mean 522.7 and std 4.111
Coefficients (with 95% confidence bounds):
       p00 =       1.792  (1.759,1.826)
       p10 =   -0.003984  (-0.03342,0.02545)
       p01 =     0.03654  (-0.02917,0.1022)
       p11 =   -0.004646  (-0.03621,0.02692)
       p02 =   -0.006507  (-0.03792,0.0249)
       p12 =  -0.0003025  (-0.04791,0.04731)
       p03 =    -0.01791  (-0.06526,0.02944)
Goodness of fit:
  SSE:1.885e-005    剩余平方和
  R-square:0.9903
  Adjusted R-square:0.9318     相关系数
  RMSE:0.004342    剩余标准差