Question: using matlab Use the demographics equation derived in class to make a script which finds the population history for 4 population groups. Assume there is

using matlab Use the demographics equation derived in class to make a script which finds the population history for 4 population groups. Assume there is no migration.
SETUP:
parameters=[ BR,d1,d2,d3,d4,t12,t23,t34] where
BR, birth rate in group 2
di, death rates in group Pi
tij, transition from group Pi to group Pj due to ageing
initconds=[ Pinit1,Pinit2,Pinit3,Pinit4]
timedata=[tinit,tfinal,delt]
RESULTS:
P1,P2,P3,P4, group time histories as row vectors. If these conventions are not followed an incorrect answer will result. % Parameters
BR=.02;
d1=.004;
d2=.0075;
d3=.012;
d4=.019;
t12=.067;
t23=.04;
t34=.04;
% Initial conditions (in 1000's for convenience)
Pinit1=1200;
Pinit2=1000;
Pinit3=800;
Pinit4=600;
% Time parameters
tinit=0.;
tfinal=100.;
delt=0.5;
%% Your code goes here %%
% DISPLAY RESULTS SECTION ----- THIS SECTION WILL HELP YOU VISUALIZE YOUR RESULTS
figure
subplot(2,1,1) plot(t,P1(:),'-',t,P2(:),'--','LineWidth',2)
title('Demographics 1: P1, P2 histories, in 1000''s')
%xlabel('t, years')
ylabel('P1, P2')
legend('P1','P2')
grid on
subplot(2,1,2)
plot(t,P1(:),'-',t,P2(:),'--',t,P3(:),'-.',t,P4(:),':','LineWidth',2)
title('P1, P2, P3, P4 histories, in 1000''s')
xlabel('t, years')
ylabel('P1, P2, P3, P4')
legend('P1','P2','P3','P4')
grid on

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!