用matlab拟合函数

x=[0.0318,0.0208,0.0148,0.00974,0.00744,0.00574,0.00424,0.00339,0.00279,0.00221,0.001... x=[0.0318,0.0208,0.0148,0.00974,0.00744,0.00574,0.00424,0.00339,0.00279,0.00221,0.00186,0.00161,0.00136,0.00121,0.00109,0.000963]';
y=[10,20,40,100,200,400,1000,2000,4000,10000,20000,40000,100000,200000,400000,1000000]';
要拟合成这种形式:(a/165000)*(2*x)^b+d*(2*x)^c,要确定a,b,c,d
看了很多人的评论,但自己总是出不来结果
大神帮一下吧!
展开
 我来答
lhmhz
高粉答主

2016-09-17 · 专注matlab等在各领域中的应用。
lhmhz
采纳数:7264 获赞数:17010

向TA提问 私信TA
展开全部

用matlab拟合成:(a/165000)*(2*x)^b+d*(2*x)^c这种形式,一般可以lsqcurvefit()来确定a,b,c,d的系数。

经拟合可以求得

a=0.00011353,b=1,c=-5.1844,d=-5.1844

R^2=0.97664    %相关系数(拟合度)

运行代码:

追问
大神你好,非常感谢你的回答,但是我好像方程给错了。。。应该是x=(a/165000)*(2*y)^b+d*(2*y)^c,您能不能帮我再算一下啊。。。我用你的代码总是出现solver stopped prematurely是什么情况?
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式