[matlab]利用cftool进行曲线拟合

1.输入需要进行闭合的数据,进入workspace

x = [0 5 10 20 30 40 50 60 80];
y = [0 2.25 6.8 20.15 35.7 56.4 75.1 87.15 98.5];

2.启动拟合工具箱

在命令行中直接输入

cftool

3.然后利用工具箱进行数据拟合,操作界面比较人性化

[matlab]利用cftool进行曲线拟合_第1张图片

主要的结果参数

Coefficients (with 95% conffidence range) (95%致信区间内的拟合常数)
- $a_1$ = … (…) (等号后面是平均值,括号里是范围)

Godness of fit (统计结果)
- SSE (方差)
- R-squared (决定系数)
- Adjusted R-squared (校正后的决定系数)
- RMSE (标准差)

可以选用的方法
- Custom Equations:用户自定义的函数类型
- Exponential:指数逼近,有2种类型, aebx a e b x aebx+cedx a e b x + c e d x
Fourier:傅立叶逼近,有7种类型,基础型是 a0+a1cos(wx)+b1sin(wx) a 0 + a 1 cos ⁡ ( w x ) + b 1 sin ⁡ ( w x )
- Gaussian:高斯逼近,有8种类型,基础型是 a1e[(xb1)c1]2 a 1 ∗ e − [ ( x − b 1 ) c 1 ] 2
- Interpolant:插值逼近,有4种类型,linear、nearest neighbor、cubic spline、shape-preserving
- Polynomial:多形式逼近,有9种类型,linear、quadratic、cubic 、4-9th degree
- Power:幂逼近,有2种类型, axb a x b axb+c a x b + c
- Rational:有理数逼近,分子、分母共有的类型是linear 、quadratic、cubic、4-5th degree ;此外,分子还包括constant型
- Smoothing Spline:平滑逼近
- Sum of Sin Functions:正弦曲线逼近,有8种类型,基础型是 a1sin(b1x+c1) a 1 sin ⁡ ( b 1 x + c 1 )
- Weibull:只有一种, abxb1exp(axb) a ∗ b ∗ x b − 1 ∗ e x p ( − a ∗ x b )

你可能感兴趣的:(matlab)