function langford_ode23 ( )

%*****************************************************************************80
%
%% langford_ode23() uses ode23() to solve langford_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 September 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'langford_ode23()\n' );
  fprintf ( 1, '  langford_ode() solved by ode23().\n' );
%
%  Get the parameter values.
%
  [ a, b, c, d, e, f, t0, xyz0, tstop ] = langford_parameters ( );

  f = @ langford_deriv;
  tspan = [ t0, tstop ];
%
%  Compute the approximate solution at equally spaced times.
%
  [ t, y ] = ode23 ( f, tspan, xyz0 );

  n = size ( t, 1 );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of variable size steps = %d\n', n );
%
%  Plot the data.
%
  clf ( );
  hold ( 'on' );
    plot3 ( y(1,1), y(1,2), y(1,3), 'g.', 'markersize', 15 )
    plot3 ( y(end,1), y(end,2), y(end,3), 'r.', 'markersize', 15 )
    plot3 ( y(:,1), y(:,2), y(:,3), 'b-', 'linewidth', 1 );
    view ( 3 );
  hold ( 'off' );
  grid ( 'on' );
  xlabel ( '<-- X -->' );
  ylabel ( '<-- Y -->' );
  zlabel ( '<-- Z -->' );
  title ( 'langford\_ode(): solved by ode23()' );
  filename = 'langford_ode23.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s\n', filename );

  return
end

