用matlab拟合数据曲线求参数,x=[1.14,1.28,1.43,1.85,2,2.09,2.8,3.9,4.28,5.94,7.41,12.64,20.78]y=[0.98,1.1,1.85,3.18,3.35,3.8,6.13,10.15,12.05,21.75,32.07,55.94,64.28]函数为y=A*(1-exp((-2*x^2)/B^2));求A和B,
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/09 01:42:43
用matlab拟合数据曲线求参数,x=[1.14,1.28,1.43,1.85,2,2.09,2.8,3.9,4.28,5.94,7.41,12.64,20.78]y=[0.98,1.1,1.85,3.18,3.35,3.8,6.13,10.15,12.05,21.75,32.07,55.94,64.28]函数为y=A*(1-exp((-2*x^2)/B^2));求A和B,
用matlab拟合数据曲线求参数,
x=[1.14,1.28,1.43,1.85,2,2.09,2.8,3.9,4.28,5.94,7.41,12.64,20.78]
y=[0.98,1.1,1.85,3.18,3.35,3.8,6.13,10.15,12.05,21.75,32.07,55.94,64.28]
函数为y=A*(1-exp((-2*x^2)/B^2));
求A和B,
用matlab拟合数据曲线求参数,x=[1.14,1.28,1.43,1.85,2,2.09,2.8,3.9,4.28,5.94,7.41,12.64,20.78]y=[0.98,1.1,1.85,3.18,3.35,3.8,6.13,10.15,12.05,21.75,32.07,55.94,64.28]函数为y=A*(1-exp((-2*x^2)/B^2));求A和B,
x=[1.14,1.28,1.43,1.85,2,2.09,2.8,3.9,4.28,5.94,7.41,12.64,20.78];
y=[0.98,1.1,1.85,3.18,3.35,3.8,6.13,10.15,12.05,21.75,32.07,55.94,64.28];
plot(x,y,'.')
hold on
fun=@(A,x)A(1)*(1-exp((-2*x.^2)/A(2)^2));
p=nlinfit(x,y,fun,[1;1])%p第1个值为A,第2个值为B
xx=min(x)*0.5:0.1:max(x)*1.2;
yy=fun(p,xx);
plot(xx,yy)