this is my Matlab code for lemur and plant populationsimulation. But i didn't get the right graph.
R(1,1)=35; % Initial pop of males
R(2,1)=35; % Initial pop of females
P(3,1)=200000; % Iniitial pop of plants
r(1)=1.01; % Growth rate of male pop
r(2)=1.01; % Growth rate of female pop
r(3)=1.10; % Growth rate of plants
K(1)=800; % Carrying capacity for male pop
K(2)=600; % carrying capacity for female pop
K(3)=7500000; % carrying capacity for plants
 Â
E=65; % Plants per animal
A=150000; % Animal 'Plant needs'
NW=200; % Weeks for simulation
 Â
for m=2:NW
 Â
P(3,m)=(r(3)*P(3,m-1)*((K(3)-P(3,m-1))/K(3))) -(E*R(m));
R(m-1)=R(1,m-1)+ R(2,m-1);
 Â
R(1,m)=(r(1)*R(1,m-1)*(K(1)-R(1,m-1))*P(3,m-1))/(K(1)*A);
R(2,m)=(r(2)*R(2,m-1)*(K(2)-R(2,m-1))*P(3,m-1))/(K(2)*A);
end
 Â
subplot(1,2,1)
plot(1:NW,R(1,1:NW),1:NW,R(2,1:NW))
xlabel('Month')
ylabel('population')
legend('male','female')
 Â
subplot(1,2,2)
plot(1:NW,P(3,1:NW))
xlabel('Month')
ylabel('Plant population')
 Â
 Â