hongyu0304 发表于 2012-3-28 08:59:21

自带函数不能拟合,自定义相同的函数却可以拟合

我遇到这样一个问题:
x=[0
0.2
0.4
0.6
0.8
1.0];
y=[234.10
184.30
174.10
166.50
160.20
154.90
];
用matlab里面自定义的函数y=a*x^b+c不能拟合,提示“Fit could not be computed due to error:

Power functions cannot be fit to non-positive xdata.”。

但是我自定义一个相同的函数y=a*x^b+c却可以拟合,而且效果非常好。

求高手指点为什么会出现这种情况?

谢谢!


页: [1]
查看完整版本: 自带函数不能拟合,自定义相同的函数却可以拟合