7 8.5832 8.9353 9.3987 9.6604Р即拟合得V0=5.5577, =3.5002。Р(2)用命令lsqnonlin。Р1)编写M文件curvefun2.mРfunction f=curvefun2(x)Рtdata=[0.5 1 2 3 4 5 7 9];Рcdata=[6.36 6.48 7.26 8.22 8.66 8.99 9.43 9.63];Рf=cdata-10+(10-x(1))*exp(-tdata/x(2));Р2)主程序xitithree2.m如下Рx0=[0.4316,1];Рx=lsqnonlin('curvefun2',x0)Рf=curvefun2(x)Р3)运行主程序,得结果为Рx =Р 5.5577 3.5002Рf =Р0.2110 -0.1816 -0.2313 0.1053 0.0768 0.0547 0.0313 -0.0304Р结果同上,即拟合得V0=5.5577, =3.5002。Р解二:Р(1)对将要拟合的非线性模型,建立M文件volum.m如下:Рfunction yhat=volum(beta,t)Рyhat=10-(10-beta(1))*exp(-t./beta(2));Р(2)输入数据:Рt=[0.5 1 2 3 4 5 7 9];Рy=[6.36 6.48 7.26 8.22 8.66 8.99 9.43 9.63];Рbeta0=[5 3]';Р(3)求回归系数:Р[beta,r,J]=nlinfit(t',y','volum',beta0);РbetaР得结果:beta =Р 5.5577Р3.5002Р即得回归模型为:Р预测及作图:Р[YY,delta]=nlpredci('volum',t',beta,r,J);Рplot(t,y,'k+',t,YY,'r')Р七、指导教师评语及成绩: