function yp = lotka ( x, y )

%*****************************************************************************80
%
%% lotka() evaluates the right hand side of a lotka-volterra ODE.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    03 August 2019
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real x: the value of the independent variable.
%
%    real y(2): the value of the dependent variables.
%
%  Output:
%
%    real yp(2): the right hand side of the differential equation.
%
  yp = zeros ( 2, 1 );
  u = y(1);
  v = y(2);

  yp(1) = - u .* v + 2.0 * u;
  yp(2) =   u .* v - v;

  return
end

