function [t,y] = euler(t0,tN,N,y0,f) % Méthode d’Euler

h = (tN-t0)/N;
t = linspace(t0,tN,N+1) ; 
y(1) = y0 ; 
for n = 1 : N
y(n+1) =y(n) + h*feval(f,t(n),y(n)) ; 
end 
end 