function rubber_band_ode45 ( )

%*****************************************************************************80
%
%% rubber_band_ode45() uses ode45() to solve rubber_band_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    25 April 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'rubber_band_ode45():\n' )
  fprintf ( 1, '  Solve rubber_band_ode() using ode45().\n' );

  [ a, b, lam, mu, t0, y0, tstop ] = rubber_band_parameters ( );

  f = @ rubber_band_deriv;
  tspan = [ t0, tstop ];
  
  [ t, y ] = ode45 ( f, tspan, y0 );

  n = size ( t, 1 );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of variable size steps = %d\n', n );
%
%  Time plot.
%
  plot ( t, y(:,1), 'r-', ...
         t, y(:,2), 'b-', 'linewidth', 2 );
  grid ( 'on' );
  xlabel ( '<-- t -->' );
  ylabel ( '<-- y1(t), y2(t) -->' );
  title ( 'rubber_band_ode(): ode45(): plot' );
  filename = 'rubber_band_ode45_plot.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Phase plot.
%
  plot ( y(:,1), y(:,2), 'linewidth', 2 );
  grid ( 'on' );
  xlabel ( '<-- y1(t) -->' );
  ylabel ( '<-- y2(t) -->' );
  title ( 'rubber_band_ode(): ode45(): phase' );
  filename = 'rubber_band_ode45_phase.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

