%  Volterra avec Euler explicite
%
%
a=1;b=1;c=1;d=1;y01=3;y02=0.5
fvol=@(t,y) [a*y(1)-b*y(1)*y(2);-c*y(2)+d*y(1)*y(2)]
%
T=40
N=20000
h=T/N
t=0:h:T
%
y=[y01;y02]
%
Yapp=[y]
for i=1:N
y=y+h*fvol(t(i),y);
 Yapp=[Yapp,y];
end
figure(1)
clf()
plot(t,Yapp(1,:),'b-')
hold on
plot(t,Yapp(2,:),'black-')
%
figure(2)
clf()
plot(Yapp(1,:),Yapp(2,:))