function blood_pressure_euler ( n )

%*****************************************************************************80
%
%% blood_pressure_euler() uses euler() to solve blood_pressure_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 March 2022
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N: the number of steps to take.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'blood_pressure_euler():\n' );
  fprintf ( 1, '  Use euler() to solve blood_pressure_ode().\n' );
  fprintf ( 1, '  Number of equal steps = %d\n', n );
%
%  Get the parameters.
%
  [ pdia, psys, pulse, q, told, t0, y0, tstop ] = blood_pressure_parameters ( );
%
%  Estimate the solution.
%
  tspan = [ t0, tstop ];

  [ t, y ] = euler ( @blood_pressure_deriv, tspan, y0, n );

  ye = blood_pressure_exact ( t );
%
%  Plot the solution curve.
%
  plot ( t, y, 'bo', ...
         t, ye, 'r-', 'linewidth', 3 );

  title ( 'blood\_pressure\_ode():, euler' );
  grid ( 'on' );
  xlabel ( '<--- T --->' );
  ylabel ( '<--- X(T) --->' );
  legend ( 'Computed', 'Exact' );
%
%  Save a copy in a file.
%
  filename = 'blood_pressure_euler.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

