南边的北边 发表于 2011-4-19 20:33:50

关于拟合fittype的问题,请教高手!

本帖最后由 南边的北边 于 2011-4-19 20:36 编辑

有两组数据:x=;
y=;想要对其进行拟合,采用指数拟合。
尝试两种命令操作:
1.自己定义指数函数,但采用的是cftool一样的指数函数,下面是结果。
>> f=fittype('a*exp(b*x)+c*exp(d*x)','coeff',{'a','b','c','d'});
>> =fit(x',y',f)
Warning: Start point not provided, choosing random start point.
> In fit>handlewarn at 705
In fit at 321
c =
General model:
c(x) = a*exp(b*x)+c*exp(d*x)
Coefficients (with 95% confidence bounds):
a = 0.00362 (-0.02079, 0.02803)
b = 0.1983 (-0.107, 0.5036)
c = -3.244e-010 (-1.577e-008, 1.512e-008)
d = 0.7468 (-0.7801, 2.274)

gof2 =
sse: 1.7698
rsquare: -282.6509
dfe: 22
adjrsquare: -321.3306
rmse: 0.2836
另外附上cftool的结果:
General model Exp2:
   f(x) = a*exp(b*x) + c*exp(d*x)
Coefficients (with 95% confidence bounds):
       a =      0.1916(0.1792, 0.204)
       b =      -0.319(-0.3373, -0.3006)
       c =   0.04072(0.03814, 0.04329)
       d =    -0.04487(-0.0476, -0.04214)
Goodness of fit:
SSE: 1.669e-006
R-square: 0.9997
Adjusted R-square: 0.9997
RMSE: 0.0002754
两者的差别比较大,感觉问题应该是warning的问题吧,请教高手如何处理warning中的关于处置的设置呢!
页: [1]
查看完整版本: 关于拟合fittype的问题,请教高手!