Question: Assign finalPopulation with the population size given an initial population, population growth rate, and number of years. The population growth is calculated by: Final population

 Assign finalPopulation with the population size given an initial population, populationgrowth rate, and number of years. The population growth is calculated by:

Assign finalPopulation with the population size given an initial population, population growth rate, and number of years. The population growth is calculated by: Final population = Initial population* (1 + Rate of growth)Number of years Your Function B Save C Reset I a MATLAB Documentation 1 % Create a function name "CalculatePopulation (O" to calculate the population. 3 function final Population = CalculatePopulation (initialPopulation, growthRate, numberYears ) 5 % Assign final Population with the population size given an 7 % initial population, population growth rate , and number of years 9 finalPopulation = initiatPopulation * ((1 + growthRate).numberYears); 10 11 12 13 % Call the function "calculatePopulation()" to findd the final population. 14 15 S=sprintf('Final population = f ", CalculatePopulation (10000, 0.06, 20) ); 16 17% Display the final population. 18 19 disp (S) 21 % Call the function "calculatePopulation()" to findd the final population. 23 S=sprintf('Final population = f ", CalculatePopulation (10000, 0.40, 10)); 25 % Display the final population

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!