File:Logistic curve vector field.png
Summary
Description |
日本語: ロジスティック曲線とそのベクトル図。Scilabで作成 |
Date | |
Source | Own work |
Author | Yapparina |
Scilab source
Category:Images with Scilab codeclear
r=1; //intrinsic rate of natural increase
K=1; //carrying capacity
deff('[ydot]=g(t,y)',['ydot=r*y*(1-y/K)']);//logistic equation, y is population size, ydot is dy/dt
tc=-2:0.4:2;
nc=-1:0.2:2;
dx=zeros(length(tc),length(nc));
dy=zeros(length(tc),length(nc));
for nnc=1:length(nc)
for ntc=1:length(tc)
dx(ntc,nnc)=cos(atan(g(tc(ntc),nc(nnc))));
dy(ntc,nnc)=sin(atan(g(tc(ntc),nc(nnc))));
end
end
clf();
champ(tc, nc, dx, dy)
xtc=-2:0.01:2.2;
x=K./(1+(K./0.5-1)*exp(-r.*xtc));//logistic curve 1, the initial population size N0 = 0.5
plot2d(xtc,x)
xtc=-2:0.01:0.45;
x=K./(1+(K./-0.5-1)*exp(-r.*xtc));//logistic curve 2, N0 = -0.5
plot2d(xtc,x)
xtc=-0.4:0.01:2.2;
x=K./(1+(K./1.5-1)*exp(-r.*xtc));//logistic curve 3, N0 = 1.5
plot2d(xtc,x)
xlabel('t');
ylabel('N');
zoom_rect([-2.1,-1.3,2.3,2.1])
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
![]() ![]() |
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
|