如何用mathematica拟合数据
我想把数据拟合成y=Sqrt[3.1207853+0.02825765/(x^2-0.0147568)-0.005254*x^2]的形式。In[5]:=data={{0....
我想把数据拟合成y=Sqrt[3.1207853+0.02825765/(x^2-0.0147568)-0.005254*x^2]的形式。
In[5]:= data = {{0.363, 1.8333412}, {0.4047, 1.8194391}, {0.4358,
1.8114123}, {0.48, 1.8029553}, {0.5461, 1.7939887}, {0.5875,
1.7900643}, {0.6438, 1.7858227}, {0.7065, 1.7822428}, {0.8521,
1.7767532}, {1.014, 1.7729684}, {1.53, 1.7665892}, {2.325,
1.7599801}};
In[21]:= FindFit[data, {(a + b/(x^2 -c) + d*x^2)^0.5}, {a, b, c,
d}, x]
这样做有什么问题吗,怎么总运行不出结果来。 展开
In[5]:= data = {{0.363, 1.8333412}, {0.4047, 1.8194391}, {0.4358,
1.8114123}, {0.48, 1.8029553}, {0.5461, 1.7939887}, {0.5875,
1.7900643}, {0.6438, 1.7858227}, {0.7065, 1.7822428}, {0.8521,
1.7767532}, {1.014, 1.7729684}, {1.53, 1.7665892}, {2.325,
1.7599801}};
In[21]:= FindFit[data, {(a + b/(x^2 -c) + d*x^2)^0.5}, {a, b, c,
d}, x]
这样做有什么问题吗,怎么总运行不出结果来。 展开
推荐于2016-04-07 · 知道合伙人互联网行家
关注
展开全部
拟合优化问题用1stOpt最方便和强大:
代码:
Function y=a*(exp(-b*x)-exp(-c*x));
RowData;
x=1,2,4,6,15,24;
y=12.08,18.6,16.84,15.24,7.6,4.08;
结果:
R^2= 0.979448193393254
a 24.6180095349435
b 0.0777131341921694
c 0.926055749013901
代码:
Function y=a*(exp(-b*x)-exp(-c*x));
RowData;
x=1,2,4,6,15,24;
y=12.08,18.6,16.84,15.24,7.6,4.08;
结果:
R^2= 0.979448193393254
a 24.6180095349435
b 0.0777131341921694
c 0.926055749013901
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |