clear;
K=100;M=10;N=K;r=0.5;
function f=flogistic(y);
  f=r*y.*(1-y/K);// please observe the ".*" . Do you understand why it is not "*" ?
endfunction;
function f=fAllee(y);
  f=r*y.*(1-y/N).*(y/M-1);
endfunction;

xset("window",0);
y=0:0.1:N; // the vector 0,0.1,0.2,...,N
plot(y,flogistic(y));// here why ".*" :-)
xset("window",1);
plot(y,fAllee(y));
a=gca(); //get the current axes
a.box="off"; //removes the boxe round the figure
a.x_location = "origin"; //puts x-axes at y=0
//
xs2eps(gcf(),'fonclogist.eps');//saves (in the current "Scilab" directory)

// y=ode(y0,t0,t,f)
t0=0;y0=5;
t=t0:0.1:20;
function f=fL(t,y);
  f=flogistic(y);
endfunction;
xset("window",2);
sol=ode(y0,t0,t,fL);
plot(t,sol)

function f=fA(t,y);
  f=fAllee(y);
endfunction;
solA=ode(y0,t0,t,fA);
plot(t,solA,"-r"); // r for "red"










t0=0;
t=t0:0.1:10;
function f=fA(t,y);
  f=fAllee(y);
endfunction;
function f=fL(t,y);
  f=flogistique(y);
endfunction;
//for y0=-10:2:2*N;
y0=5;
plot(t,ode(y0,t0,t,fA));
plot(t,ode(y0,t0,t,fL));

ode(5,0,10,fL)plot(y,fAllee(y));
plot(y,fAllee(y));
plot(y,fAllee(y));
lear;
K=100;M=10;N=K;r=0.5;
function f=flogistic(y);
  f=r*y.*(1-y/K);
endfunction;clear;
K=100;M=10;N=K;r=0.5;
function f=flogistic(y);
  f=r*y.*(1-y/K);
endfunction;xs2eps(gcf(),'fonclogist.eps');