Rename year directories to allow natural ordering

This commit is contained in:
2023-12-20 03:57:27 +00:00
parent 0ab1f5ad3a
commit 1f7d812b98
1895 changed files with 0 additions and 7188 deletions

View File

@ -0,0 +1,22 @@
clear;
r = 0.2; % random val for r
K = linspace(1000, 1000000, 50);
time_vec = linspace(0, 100, 50);
P = 100; % random val for P
population = zeros(length(time_vec), 50);
% implementing the model as an anonymous function
dpdt = @(t,P,r,K) r*P * (1 - (P/K));
for loopcounter = 1:50
[t,y] = ode45(dpdt, ...
time_vec, ...
P, ...
odeset, ...
r, ...
K(loopcounter));
population(:, loopcounter) = y(:,1);
end
plot(time_vec, population);