作业帮 > 综合 > 作业

matlab拟合x=[0,1,1.5,2,3,25];y=[1,0.93,0.88,0.82,0.74,0.002];对

来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/08/19 03:50:50
matlab拟合
x=[0,1,1.5,2,3,25];
y=[1,0.93,0.88,0.82,0.74,0.002];
对此进行高斯拟合,并求出拟合后对就6.11与3.4处的x点的值
matlab拟合x=[0,1,1.5,2,3,25];y=[1,0.93,0.88,0.82,0.74,0.002];对
x=[0,1,1.5,2,3,25]';
>> y=[1,0.93,0.88,0.82,0.74,0.002]';
>> xx=fit(x,y,'gauss1','MaxIter',1000)
xx =
General model Gauss1:
xx(x) = a1*exp(-((x-b1)/c1)^2)
Coefficients (with 95% confidence bounds):
a1 = 1.158 (0.711,1.605)
b1 = -3.88 (-11.68,3.923)
c1 = 10.22 (2.691,17.74)
>> xx(6.11)
ans =
0.4452
>> xx(3.4)
ans =
0.6971