function [u]=euler1(neqn,t0,tf,u0,npts)
%
% Function euler1 computes an ODE solution by
% the Euler method for a series of points along
% the solution by repeatedly calling function
% derv to define the ODE derivative vector
%
% Argument list
%
%   neqn     number of first order ODEs
%
%   t0       initial value of independent variable
%
%   tf       final value of independent variable
%
%   u0       initial condition vector of length neqn
%
%   npts     number of Euler steps
%
%   u        ODE solution vector of length eqn after
%            npts steps
%
% Integration step
  h=(tf-t0)/npts;
%
% npts Euler steps
  for i=1:npts
%
%   Derivative vector at base point
    [ut0]=derv(neqn,t0,u0);
%
%   Euler step
    u=u0+ut0*h;
    t=t0+h;
%
%   Reset base point values for next Euler step
    u0=u;
    t0=t;
%
% Next Euler step  
  end
%
% npts Euler steps completed
