用matlab怎么拟合曲线啊x=[0.018902770.0188163570.0199536380.0143978060.0217596970.0235792020.024795340.0250734570.0270541080.03030303];>> y=[0.0100550960.0098228660.0100478470.0091447370.0032851510.0032889260.0029287340.0028268550.0025942930.0
来源:学生作业帮助网 编辑:六六作业网 时间:2025/01/19 10:14:13
用matlab怎么拟合曲线啊x=[0.018902770.0188163570.0199536380.0143978060.0217596970.0235792020.024795340.0250734570.0270541080.03030303];>> y=[0.0100550960.0098228660.0100478470.0091447370.0032851510.0032889260.0029287340.0028268550.0025942930.0
用matlab怎么拟合曲线啊
x=[0.01890277
0.018816357
0.019953638
0.014397806
0.021759697
0.023579202
0.02479534
0.025073457
0.027054108
0.03030303
];
>> y=[0.010055096
0.009822866
0.010047847
0.009144737
0.003285151
0.003288926
0.002928734
0.002826855
0.002594293
0.002542373
];
f=@(p,x)p(1)+p(2)*exp(p(3)*x+p(4));
p=lsqcurvefit(f,[40,-10,-5,10],x,y)
h=34.7386-13.9669*exp(0.018*x+0.9106)
我想得到图形,用matlab怎么求啊?如果用plot(x,h),得到的是直线,而我想拟合后得到曲线啊,怎么回事啊,
用matlab怎么拟合曲线啊x=[0.018902770.0188163570.0199536380.0143978060.0217596970.0235792020.024795340.0250734570.0270541080.03030303];>> y=[0.0100550960.0098228660.0100478470.0091447370.0032851510.0032889260.0029287340.0028268550.0025942930.0
你画的的确是曲线.但是你的指数部分太小了,曲线可以用直线来近似.