%Part1:Logistic Model
% dP/dt=rP*dt,P(t0)=P0
% P:t时刻人口数 r:人口自然增长率
%fplot(@(t)1000000*ones(1,2));
K=1000;%设定人口上限
r=0.18;
syms P t
P=dsolve('DP/((1-P/1000)*P)=0.18','P(0)=200',t);%K<P0
P=matlabFunction(P);
x=0.5:0.5:200;
ft=[];
for i=0.5:0.5:200
ft=[ft,int(0.01*P(t),0,i)];
end
plot(x,0.001*ft);
axis([0 200 0 1]);%坐标范围
set(gca,'xtick',0:10:200);%刻度设置
set(gca,'ytick',0:0.1:1);
ti=title('The rate of decomposition varies over time ');
xlabel('Time(day)')
ylabel('The rate of the decomposition(%)')
l=legend('The curve of percentage')
阻滞增长模型Logistic model Matlab
最新推荐文章于 2023-06-15 15:21:48 发布