Code: populationestimator.m
clc
clear
t0 = 1950;
p0 = 2555;
tEnd = 2000;
h = 10;
N = (tEnd - t0)/h;
%% Initializing solution
t = [t0:h:tEnd]';
p = zeros(N + 1, 1);
p(1) = p0;
%% Ploting given data
pg = [2555 3040 3708 4454 5276 6079];
plot(t, pg, 'ko');
hold on
%% Solving using Euler's Explicit Method
for i = 1:N
fi = funp(t(i), p(i));
p(i + 1) = p(i) + h*fi;
end
plot(t, p, 'r-');
legend('given data', 'simulation result');
Code: funp.m
function dp = funp(t, p)
kgm = 0.026;
pmax = 12000;
dp = kgm * (1 - p/pmax)*p;
end
Output:

Solve the following utilizing MATLAB code. must provide the inputs and outputs of the function. the function should be able to solve such problem using Eulers method, in which after solving must p...
MUST USE MIDPOINT METHOD AND ANONYMOUS FUNCTION and MATLAB, no
outer function please. Will rate answer 5 stars if done right
:)
Solve using the midpoint method (RK2), choose a step size The logistic model is used to simulate population as in: Pmax where p -population, kgm -the maximum growth rate under unlimited conditions, and pmax - the carrying capacity. Simulate the world's population from 1950 to 2000 using one of the numerical methods described in this chapter. Employ the...