通过编程(程序见附件4)拟合求解得xm= 381.0805 r=1.27e-008年 拟合效果如下图:
图4 阻滞增长模型的拟合图
从上图我们可以看出我们的模型对该地区的人口数据拟合得很好,最后把
)?295.368。 xm= 381.0805 r=1.27e-008年代进模型中,解得x(2010从上图可以看出阻滞增长模型更客观地反映人口的增长规律,基本上都在拟合曲
线上,拟合效果好,特别是后期的数据非常的吻合,所以这次模型对未来的人口数预测是很适合的,结果更准确,对未来的预测比指数增长模型更为优越。
参考文献
[1]数学模型 姜启源 谢金星 叶俊 高等教育出版社 北京 2010 [2]老师讲义
附录
附件1:1800年到2000年的人口数据图
x=1800:10:2000;
y=[7.2 13.8 17.2 17.6 24.7 33.6 36.2 48.6 58.1 73.3 89.8 105.6 125.9 149.1 172.2 189.8 230.5 246.7 262.1 271.2 280.3]; plot(x,y,'rp');
xlabel('年份'); ylabel('人口数量');
附件2:线性增长模型的拟合代码
x=1800:10:2000;
y=[7.2 13.8 17.2 17.6 24.7 33.6 36.2 48.6 58.1 73.3 89.8 105.6 125.9 149.1 172.2 189.8 230.5 246.7 262.1 271.2 280.3]; p=polyfit(x,y,1) plot(x,y,'*') hold on
xx=[1800:10:2010] yy=polyval(p,xx) plot(xx,yy) xlabel('年份'); ylabel('人口数量');
附件3:指数增长模型的拟合代码
x=1800:10:2000;
y=[7.2 13.8 17.2 17.6 24.7 33.6 36.2 48.6 58.1 73.3 89.8 105.6 125.9 149.1 172.2 189.8 230.5 246.7 262.1 271.2 280.3]; plot(x,y,'b*-'); a0=[0.001,1];
a=lsqcurvefit('example_curvefit_fun',a0,x,y); xi=1800:10:2020;
yi=example_curvefit_fun(a,xi); hold on;
plot(xi,yi,'r'); xlabel('年份'); ylabel('人口数量');
文件example_curvefit_fun.m
function f=example_curvefit_fun(a,t) f=exp(a(1)*t+a(2));
附件4:阻滞增长模型的拟合代码 文件function fy = fun(a,t)
fy=a(1)./(1+(a(1)./7.2-1)*exp(a(2)*(t-1800)));
clc;clear;
x=1800:10:2000;
y=[13.2 26.8 33.2 34.2 48.4 66.2 71.4 95 113.6 144.4 177.4 209 249.2 295.6 342.2 377.6 459 491.4 522.2 540.2 558.4];
plot(x,y,'--b'); hold on;
plot(x,y,'*'); x0=[588,1];
fxx = lsqcurvefit('fun',x0,x,y); %A=polyfit(x,y,1); %z=polyval(A,x); z=fun(fxx,x); hold on;
plot(x,z,'r') hold on;
fx = lsqcurvefit('fun',x0,x,y); zz=fun(fx,x); plot(x,zz,'y')