function brusselator_ode45 ( )

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

  [ a, b, t0, y0, tstop ] = brusselator_parameters ( );

  figure ( );
  clf ( );
  hold ( 'on' )

  f = @brusselator_deriv;
  tspan = [ t0, tstop ];

  for u0 = 0 : 5
    for v0 = 0 : 3
      y0 = [ u0; v0 ];
      [ t, y ] = ode45 ( f, tspan, y0 );
      n = size ( t, 1 );
      fprintf ( 1, '  Number of adaptive steps = %d\n', n );
      plot ( y(:,1), y(:,2) );
    end
  end

  hold ( 'off' )
  grid ( 'on' );
  xlabel ( '<---  u(t)  --->' );
  ylabel ( '<---  v(t)  --->' );
  title ( 'brusselator_ode(): ode45, phase' )
  filename = 'brusselator_ode45_phase.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

