matlab曲线拟合工具箱cftool,Matlab曲线拟合工具箱CFtool使用

Matlab曲线拟合工具箱CFtool使用

CFtool是Matlab中的曲线拟合工具箱,能够实现很多基本的曲线拟合算法,使用非常方便,现将其使用方法简介如下:

步骤1:在命令行输入数据x、y x=[2000 2500 3000 3500 4000 4500 5000 5500 6000 6500 7000 7500 8000 8500 9000 9500]'; y=[4.46 2.58 1.95 1.62 1.42 1.27 1.16 1.08 1.02 0.96 0.92 0.88 0.85 0.83 0.80 0.78]';

步骤2:打开曲线拟合工具箱cftool

步骤3:进行实际操作

①、 点击“Data”,选择 X Data 和Y Data,然后点击“Create data set”然后关闭

②、 点击“Fitting”按钮,弹出“Fitting”窗口 点击“New fit”按钮,可修改项目名称“Fit name”,通过“Data set”下拉菜单选择数据集,然后通过下拉菜单“Type of fit”选择拟合曲线的类型,工具箱提供的拟合类型有: Custom Equations: Exponential: Fourier: Gaussian: Interpolant: Polynomial: Power: Rational: Smoothing Spline: Sum of Sin Functions: Weibull: 如选择Polynomial,则有以下几种类型: Linear Polynomial; Quadratic Polynomial; Cubic Polynomial 4th degree Polynomial 一直到 9th degree Polynomial.

③、 选择9th degree Polynomial,然后点击“apply”,则在“Results”中显示拟合结果:

Warnings during fitting: Equation is badly conditioned. Remove repeated data points or try centering and scaling. Linear model Poly9:

f(x) = p1*x^9 + p2*x^8 + p3*x^7 + p4*x^6 + p5*x^5 + p6*x^4 + p7*x^3 + p8*x^2 + p9*x + p10 Coefficients (with 95% confidence bounds): p1 = -1.905e-032 (-3.262e-032, -5.488e-033) p2 = 1.073e-027 (3.705e-028, 1.775e-027) p3 = -2.638e-023 (-4.214e-023, -1.062e-023) p4 = 3.715e-019 (1.706e-019, 5.724e-019) p5 = -3.299e-015 (-4.898e-015, -1.7e-015) p6 = 1.915e-011 (1.093e-011, 2.737e-011) p7 = -7.27e-008 (-9.995e-008, -4.544e-008) p8 = 0.0001742 (0.0001182, 0.0002302) p9 = -0.2402 (-0.305, -0.1755) p10 = 148.2 (116.2, 180.1) Goodness of fit: SSE: 0.0003373 R-square: 1 Adjusted R-square: 0.9999 RMSE: 0.007498

同时,在拟合工具箱cftool中显示拟合曲线 0818b9ca8b590ca3270a3433284dd417.png

0818b9ca8b590ca3270a3433284dd417.png

0818b9ca8b590ca3270a3433284dd417.png

0818b9ca8b590ca3270a3433284dd417.png

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值