function ode_euler_system_test ( )

%*****************************************************************************80
%
%% ode_euler_system_test() tests ode_euler_system().
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    03 August 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../ode_euler_system' );

  timestamp ( );
  fprintf ( 1, 'ode_euler_system_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  ode_euler_system() is an interactive program which uses\n' );
  fprintf ( 1, '  the Euler method to estimate the solution of\n' );
  fprintf ( 1, '  a system of ordinary differential equation (ODE) of the form\n' );
  fprintf ( 1, '    y'' = f(x,y)\n' )
  fprintf ( 1, '  for a <= x <= b, with initial condition y(a)=ya\n' );
  fprintf ( 1, '  using n steps.\n' );

  a = 0.0;
  b = 50;
  ya = [ 4.0, 2.0 ];
  n = 8000;
  [ xp, yp ] = ode_euler_system ( 'lotka(x,y)', a, b, ya, n );

  plot ( yp(1,:), yp(2,:), 'b-' );
  grid ( 'on' );
  axis ( 'equal' );
  xlabel ( '<-- U -->' );
  ylabel ( '<-- V -->' );
  label = sprintf ( 'Lotka phase plot using %d steps', n );
  title ( label );
  filename = sprintf ( 'lotka.png', n );
  print ( '-dpng', filename );
  pause ( 5 );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ode_euler_system_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  timestamp ( );

  rmpath ( '../ode_euler_system' );

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the current YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  t = now;
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

