A=evstr(x_dialog('donnees initiales (nombre de predateurs, proies)?','[1000,50]'));
B =evstr(x_dialog('a,b,c et d','[0.05,0.002,0.00004,0.04]'));
tmax=evstr(x_dialog('temps d''observation (s)?','600'));
a=B(1,1);b=B(1,2);c=B(1,3);d=B(1,4);
//
// definition de la fonction volterra 
//
deff('[Ydot]=volterra(t,Y)',[
'Ydot(1) =  Y(1)*(a-b*Y(2))';
'Ydot(2) = Y(2)*(-d +c*Y(1))'])
t=0:min(0.1,tmax/10):tmax;
//
// resolution approchee du systeme differentiel avec ode
//
Y1 = ode([A(1);A(2)],0,t,volterra);
//
// trace des resultats
//
clf;
xselect;
m=max(Y1(1,:));n=max(Y1(2,:));
xsetech([0,0,0.75,0.5]);
plot2d([t ]',[Y1(1,:)]',[2],'011',rect=[0,0,tmax,m*1.1]);
   xtitle('Evolution des Proies')
xsetech([0,0.5,0.75,0.5]);
plot2d([t ]',[Y1(2,:)]',[5],'011',rect=[0,0,tmax,n*1.1]);
   xtitle('Evolution des Predateurs');
xsetech([0.75,0.25,0.25,0.5]);
plot2d([Y1(1,:)]',[Y1(2,:)]',[3],'011',rect=[0,0,m*1.1,n*1.1]);
   xtitle('Phases','Proies','Predateurs');