作业帮 > 综合 > 作业

利用matlab对x=[0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4]; y=[30 22.5 15

来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/18 00:07:11
利用matlab对x=[0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4]; y=[30 22.5 15 10.5 6.5 4.5 3 2.5 1.5];
对其进行二次曲线拟合,求代码及图形.
利用matlab对x=[0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4]; y=[30 22.5 15
x=[0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4]; y=[30 22.5 15 10.5 6.5 4.5 3 2.5 1.5];cftool打开拟合界面,
结果:Linear model Poly2:
       f(x) = p1*x^2 + p2*x + p3
Coefficients (with 95% confidence bounds):
       p1 =       2.317  (1.841,2.793)
       p2 =      -16.04  (-18.02,-14.06)
       p3 =       29.65  (27.95,31.34)
Goodness of fit:
  SSE:4.373
  R-square:0.9945
  Adjusted R-square:0.9927
  RMSE:0.8537
图形如下