Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use MATLAB for the problem. Problem 2 O solutions submitted (max: 4) Create a function that projects population based on static: Birth Rate (BR)

image text in transcribedimage text in transcribedimage text in transcribedPlease use MATLAB for the problem.

Problem 2 O solutions submitted (max: 4) Create a function that projects population based on static: Birth Rate (BR) Death Rate (DR) Migration will be represented as a pulse function starting at timestartM, ending at timeEndM and having magnitude Mann. A template for the function has been provided. Please do not change variable names as this will result in an incorrect answer. Function C Reset MATLAB Documentation 1 function [P,M]= popDynamics_2_fcn( BR, DR, tinit,tfinal, delt, Pinit, Mann, timeStartM, timeEndM ) 2 % 3% Case 2. M(t) is a rectangular pulse. Find P(t) history. 4 % SETUP 5 % tinit,tfinal, delt time initial, final, & timestep 6 % BR, birth rate 7 % DR, death rate 8 % Pinit, initial population level 9 % Mann, annual rate of migration (+: immigration, -: emigration) 10 % timeStartM, time at which migration begins 11 % timeEndM, time at wich migration stops 12 13 % RESULTS 14 % P, population history 15 % M, migration history 16 17 18 end Code to call your function C Reset C Reset 1 BR=. 15; 2 DR=.09; 3 tinit=0; 4 tfinal=100; 5 delt=1; 6 Pinit=400; 7 Manns-10; 8 timeStartM= 20; 9 timeEndM= 60; 10 11 [P,M]= popDynamics_2_fcn( BR, DR, tinit,tfinal, delt, Pinit, Mann, timeStartM, timeEndM ); 12 t=tinit:delt:tfinal; 13 14 15 plot(t,P) 16 title('Total Population') 17 xlabel('time (yrs)') 18 ylabel('People') 19 20 figure 21 title('Migration') 22 plot(t,M, 'r') 23 xlabel('time (yrs)') 24 ylabel('People') 25 26 Problem 2 O solutions submitted (max: 4) Create a function that projects population based on static: Birth Rate (BR) Death Rate (DR) Migration will be represented as a pulse function starting at timestartM, ending at timeEndM and having magnitude Mann. A template for the function has been provided. Please do not change variable names as this will result in an incorrect answer. Function C Reset MATLAB Documentation 1 function [P,M]= popDynamics_2_fcn( BR, DR, tinit,tfinal, delt, Pinit, Mann, timeStartM, timeEndM ) 2 % 3% Case 2. M(t) is a rectangular pulse. Find P(t) history. 4 % SETUP 5 % tinit,tfinal, delt time initial, final, & timestep 6 % BR, birth rate 7 % DR, death rate 8 % Pinit, initial population level 9 % Mann, annual rate of migration (+: immigration, -: emigration) 10 % timeStartM, time at which migration begins 11 % timeEndM, time at wich migration stops 12 13 % RESULTS 14 % P, population history 15 % M, migration history 16 17 18 end Code to call your function C Reset C Reset 1 BR=. 15; 2 DR=.09; 3 tinit=0; 4 tfinal=100; 5 delt=1; 6 Pinit=400; 7 Manns-10; 8 timeStartM= 20; 9 timeEndM= 60; 10 11 [P,M]= popDynamics_2_fcn( BR, DR, tinit,tfinal, delt, Pinit, Mann, timeStartM, timeEndM ); 12 t=tinit:delt:tfinal; 13 14 15 plot(t,P) 16 title('Total Population') 17 xlabel('time (yrs)') 18 ylabel('People') 19 20 figure 21 title('Migration') 22 plot(t,M, 'r') 23 xlabel('time (yrs)') 24 ylabel('People') 25 26

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions