matlab Logistic模型拟合 人口拟合年份1990-2012人口(百万):15.6 16.139 16.67 17.189 17.68 18.118 18.492 18.786 19.021 19.257 19.579 20.045 20.682 21.463 22.334 23.214 24.041 24.779 25.504 26.167 26.809 27.448 28.083
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/05 17:32:42
matlab Logistic模型拟合 人口拟合年份1990-2012人口(百万):15.6 16.139 16.67 17.189 17.68 18.118 18.492 18.786 19.021 19.257 19.579 20.045 20.682 21.463 22.334 23.214 24.041 24.779 25.504 26.167 26.809 27.448 28.083
matlab Logistic模型拟合 人口拟合
年份1990-2012
人口(百万):15.6 16.139 16.67 17.189 17.68 18.118 18.492 18.786 19.021 19.257 19.579 20.045 20.682 21.463 22.334 23.214 24.041 24.779 25.504 26.167 26.809 27.448 28.083
matlab Logistic模型拟合 人口拟合年份1990-2012人口(百万):15.6 16.139 16.67 17.189 17.68 18.118 18.492 18.786 19.021 19.257 19.579 20.045 20.682 21.463 22.334 23.214 24.041 24.779 25.504 26.167 26.809 27.448 28.083
function N=ymlogistic(beta,t) % 在当前文件夹下保存为 ymlogistic.m 文件
a=beta(1);b=beta(2);
N=a*exp(b*t);
%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear;clc
x=1990:2012;
y=[15.6 16.139 16.67 17.189 17.68 18.118 18.492 18.786 19.021 19.257 19.579 20.045 20.682 21.463 22.334 23.214 24.041 24.779 25.504 26.167 26.809 27.448 28.083];
beta0=[0.0000000000000030507782809553919659237409999687;
0.018226670511140866115518122114736];
beta=nlinfit(x,y,'ymlogistic',beta0)
vpa(beta)
plot(x,y,'*',x,ymlogistic(beta0,x))