内容发布更新时间 : 2024/12/23 10:41:33星期一 下面是文章的全部内容请认真阅读。
plot(x,y1,'*') plot(x,y2,'-or') grid on
附录5:
计算2001到2051年的人口总数程序
p=0.464429182; %女性占总人口的比例
N=[0.680891272 0.58459172 0.584558207 0.692220217 0.72411021 0.775536041 0.847368918 0.834418703 0.917922042 0.951466819 1.070015717 1.249256063 1.199263988 1.202198525
1.274218917 1.111050839 0.992314425 0.893797544 0.874657347 0.984356877 0.859576778 0.85215346 0.90864418 0.897944807 0.880539323 1.019086724 1.04218667 1.114823731 1.192867199 1.203566572 1.272973995 1.328513576 1.254992403 1.333819445 1.103186123 1.22470307 1.220643442 1.236736319 1.390726415 0.980765111 0.646684069 0.785660623 0.701627592 0.910420112 0.960157646 0.914258713 0.953980568 0.927429956 0.851007759 0.825482359 0.807942823 0.736552002 0.69043204 0.60580295 0.615510624 0.554785663 0.50370135 0.480051762 0.468722817 0.455364059 0.484386541 0.447344681 0.420164498 0.44238033 0.426529091 0.428183875 0.39132953 0.380409129 0.385339967 0.327924574 0.334697711 0.307330012 0.262864834 0.270663183 0.235872165 0.208725495 0.212001549 0.178456772 0.164260316 0.149842833 0.138734916 0.109899949 0.097358277 0.0765762 0.0638135 0.055794123 0.049396016 0.0382881 0.033544777 0.023870616 0.070211606]; N0=N'/10; %第0年(2001年)的女性各个年龄段的人口数(千万) N00=N0/10 %把单位化成亿(人) A=eye(90);
b=[0.974906966 0.999321231 0.99772433 0.999247616 0.999567418 0.999180663 0.999887948 0.999387596 0.999618586 0.999985672 0.999389434 0.999724354 0.999801796 0.999627626 0.999704795 0.999639686 0.999728462 0.999974533 0.999173327 0.998954118 0.999441067 0.999357392 0.999290675 0.998999176 0.999881604 0.998896347 0.998355939 0.999135339 0.999074527 0.998872652 0.999180794 0.998918159 0.999046112 0.999042354 0.999396027 0.998624972 0.998252716 0.999597855 0.998710945 0.999003274 0.999443444 0.999141415 0.998772101 0.998940505 0.997905005 0.998374562 0.997783774 0.997596666 0.997344906 0.996954499 0.996669784 0.996030759 0.995006639 0.996157488 0.994647744 0.995779435 0.995652313 0.99577713 0.992477806 0.994969564 0.988130537 0.989284868 0.988703961 0.988302563 0.98420824 0.984495416 0.985298735 0.980062089 0.978928307 0.977358446 0.971126989 0.969303899 0.969979818 0.96405059 0.961740312 0.96729706 0.948302346 0.946571559 0.949641387 0.935949391 0.912489482 0.9261805 0.923757863 0.928757906 0.918230333 0.887761389 0.885306858 0.875178086 0.882495752 0.824428701]; for i=1:90
A(i,:)=A(i,:)*b(1,i); end A;
c=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4.478E-05 0.000322169 0.000358246 0.001004604 0.004683367 0.011011165 0.033616492 0.057875394 0.074871727 0.069182006 0.076039141 0.06724895 0.052429406 0.043732464 0.034350502 0.024632733 0.023252532 0.018343847 0.014701275 0.011039961 0.007117557 0.005094843 0.00359291
21
0.002514858 0.002484781 0.001764709 0.001471644 0.000676953 0.000265476 0.000401474
0.000408779 0.000110447 0.000192401 0.000389421 0.000224069 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]; %由2001年原始数据得到的生育率 c1=1.295274487*c; %修正后的生育率 M=sum(c1'); %总合生育率 d=zeros(91,1); B=[c1;A];
L=[B,d]; %构造的lestie矩阵 for i=0:1:50
X=L^i*N0; %第i年后女性各个年龄段的人口数(千万) Z=X./p; %第i年在各个年龄段的人口总数预测 K(i+1,1)=sum(Z);
S1=sum(Z([1:15],:)); %第i年0-14岁的总人数 D(1,i+1)=S1;
S2=sum(Z([16:65],:)); %第i年15-64岁的总人数 S3=sum(Z([61:91],:)); %第i年60-90岁人数 G(1,i+1)=S3; E(1,i+1)=S2;
S4=sum(Z([66:91],:)); %第i年65-90岁人数 F(1,i+1)=S4; end
K 01-2051的人口总数
D %年龄在0-14岁总人数(包括男女) E %年龄在15-64岁总人数(包括男女) F %年龄在65岁及65岁以上总人数(包括男女) G %年龄在60岁及60岁以上总人数(包括男女)
附录 6:
function W=compare(x)
p=0.464429182; %女性占总人口的比例
N=[0.680891272 0.58459172 0.584558207 0.692220217 0.72411021 0.775536041 0.847368918 0.834418703 0.917922042 0.951466819 1.070015717 1.249256063 1.199263988 1.202198525
1.274218917 1.111050839 0.992314425 0.893797544 0.874657347 0.984356877 0.859576778 0.85215346 0.90864418 0.897944807 0.880539323 1.019086724 1.04218667 1.114823731 1.192867199 1.203566572 1.272973995 1.328513576 1.254992403 1.333819445 1.103186123 1.22470307 1.220643442 1.236736319 1.390726415 0.980765111 0.646684069 0.785660623 0.701627592 0.910420112 0.960157646 0.914258713 0.953980568 0.927429956 0.851007759 0.825482359 0.807942823 0.736552002 0.69043204 0.60580295 0.615510624 0.554785663 0.50370135 0.480051762 0.468722817 0.455364059 0.484386541 0.447344681 0.420164498 0.44238033 0.426529091 0.428183875 0.39132953 0.380409129 0.385339967 0.327924574 0.334697711 0.307330012 0.262864834 0.270663183 0.235872165 0.208725495 0.212001549 0.178456772 0.164260316 0.149842833 0.138734916 0.109899949 0.097358277 0.0765762 0.0638135 0.055794123 0.049396016 0.0382881 0.033544777 0.023870616 0.070211606];
22
N0=N'; A=eye(90);
b=[0.974906966 0.999321231 0.99772433 0.999247616 0.999567418 0.999180663 0.999887948 0.999387596 0.999618586 0.999985672 0.999389434 0.999724354 0.999801796 0.999627626 0.999704795 0.999639686 0.999728462 0.999974533 0.999173327 0.998954118 0.999441067 0.999357392 0.999290675 0.998999176 0.999881604 0.998896347 0.998355939 0.999135339 0.999074527 0.998872652 0.999180794 0.998918159 0.999046112 0.999042354 0.999396027 0.998624972 0.998252716 0.999597855 0.998710945 0.999003274 0.999443444 0.999141415 0.998772101 0.998940505 0.997905005 0.998374562 0.997783774 0.997596666 0.997344906 0.996954499 0.996669784 0.996030759 0.995006639 0.996157488 0.994647744 0.995779435 0.995652313 0.99577713 0.992477806 0.994969564 0.988130537 0.989284868 0.988703961 0.988302563 0.98420824 0.984495416 0.985298735 0.980062089 0.978928307 0.977358446 0.971126989 0.969303899 0.969979818 0.96405059 0.961740312 0.96729706 0.948302346 0.946571559 0.949641387 0.935949391 0.912489482 0.9261805 0.923757863 0.928757906 0.918230333 0.887761389 0.885306858 0.875178086 0.882495752 0.824428701];
b1=[0.974906966 0.999321231 0.99772433 0.999247616 0.999567418 0.999180663 0.999887948 0.999387596 0.999618586 0.999985672 0.999389434 0.999724354 0.999801796 0.999627626 0.999704795 0.999639686 0.999728462 0.999974533 0.999173327 0.998954118 0.999441067 0.999357392 0.999290675 0.998999176 0.999881604 0.998896347 0.998355939 0.999135339 0.999074527 0.998872652 0.999180794 0.998918159 0.999046112 0.999042354 0.999396027 0.998624972 0.998252716 0.999597855 0.998710945 0.999003274 0.999443444 0.999141415 0.998772101 0.998940505 0.997905005 0.998374562 0.997783774 0.997596666 0.997344906 0.996954499 0.996669784 0.996030759 0.995006639 0.996157488 0.994647744 0.995779435 0.995652313 0.99577713 0.992477806 0.994969564 0.988130537 0.989284868 0.988703961 0.988302563 0.98420824 0.984495416 0.985298735 0.980062089 0.978928307 0.977358446 0.971126989 0.969303899 0.969979818 0.96405059 0.961740312 0.96729706 0.948302346 0.946571559 0.949641387 0.935949391 0.912489482 0.9261805 0.923757863 0.928757906 0.918230333 0.887761389 0.885306858 0.875178086 0.882495752 0.824428701 0.7717624]; for i=1:90
A(i,:)=A(i,:)*b(1,i); end A;
c1=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4.478E-05 0.000322169 0.000358246 0.001004604 0.004683367 0.011011165 0.033616492 0.057875394 0.074871727 0.069182006 0.076039141 0.06724895 0.052429406 0.043732464 0.034350502 0.024632733 0.023252532 0.018343847 0.014701275 0.011039961 0.007117557 0.005094843 0.00359291 0.002514858 0.002484781 0.001764709 0.001471644 0.000676953 0.000265476 0.000401474
0.000408779 0.000110447 0.000192401 0.000389421 0.000224069 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]; %由2001年原始数据得到的生育率 t=sum(c1);
c=((x*p-t)/t+1)*c1 %修正后的生育率 M=sum(c'); %总合生育率 d=zeros(91,1);
23
B=[c;A];
L=[B,d]; %构造的lestie矩阵 [V,d]=eig(L); %求特征根与特征向量 p=d(42,42); %特征根
Q=-V(:,42); %对应的正特征向量 for i=0:49
D=L^i*N0; %第i年女性人口分布 E(i+1,1)=sum(D)/p %第i年总人口(2001为第0年) for j=0:90 %大于90岁的按90岁算 F(j+1,1)=j*D(j+1,1)/p;
T(j+1,1)=exp(-b1(1,j+1)); end
Y(i+1)=sum(F)/E(i+1,1); %平均年龄 end
Y %输出01-50年平均年龄矩阵 T=0; s=0;
for i=0:90 %大于90岁的按90岁算
T=T+exp(b1(1,j+1)-1); %求平均寿命,不随年份而变化 end T
W=Y/T; %社会老龄化指数 x=2001:2050; W1=compare(1.6); W2=compare(1.8); W3=compare(2.0); W4=compare(2.2); plot(x,W1,'-r') hold on plot(x,W2,'-G') plot(x,W3,'-B') plot(x,W4,'-Y')
年龄 女性总人数(万人) 出生婴儿数 0 680.8912721 0 1 584.5917197 0 2 584.5582068 0 3 692.2202166 0 4 724.1102102 0 5 775.5360408 0 6 847.368918 0 7 834.4187027 0 8 917.9220422 0 24
平均有孩子数 0 0 0 0 0 0 0 0 0 女性死亡率 0.025093034 0.000678769 0.00227567 0.000752384 0.000432582 0.000819337 0.000112052 0.000612404 0.000381414 存活率 0.974906966 0.999321231 0.99772433 0.999247616 0.999567418 0.999180663 0.999887948 0.999387596 0.999618586