g=9.6;
vp=0;
N=100;
rho=1.2;
C=1.3;
m=110;
S=0.4;
v0=sqrt(2*g*m/(C*S*rho));

function y=f(x)
  y=v0*(-exp(-2*g*x/v0)+1)/((1+exp(-2*g*x/v0)))
endfunction

function vitesse(T)
dt=T/N;
for i=1:N
    vs=vp+dt*(-g+(0.5*C*S*rho/m)*vp^2);
    vp=vs;
    t(i)=i*dt;
    v(i)=vp;
end
clf
plot(t, -v,"r", t, f,"g");
// 
endfunction


