用MATLAB拟合曲线并求函数
y=[7.53 7.04 6.2 4.8 3.57 3.03 2.54]
数据如下,已知尽量拟合成y=7.53-Aln(1+bx)的形式,我用MATLAB,一拟合就拟合失败,有没有什么软件能拟合出来 展开
>> x=[0 0.1 0.2 0.4 0.6 0.8 1];y=[7.53 7.04 6.2 4.8 3.57 3.03 2.54];
fitType=fittype('7.53-a*log(1+b*x)','independent','x','coefficients',{'a','b'})
fit(x',y',fitType)
fitType =
General model: fitType(a,b,x) = 7.53-a*log(1+b*x)
Warning: Start point not provided, choosing random start point.
> In Warning>Warning.throw at 31
In fit>iFit at 320
In fit at 109
ans =
General model: ans(x) = 7.53-a*log(1+b*x)
Coefficients (with 95% confidence bounds):
a = 5.522 (0.9524, 10.09)
b = 1.555 (-0.2776, 3.388)
这样行不行?
可以的,请问我自己要怎么输才能出来图象