function y = blood_pressure_exact ( t )

%*****************************************************************************80
%
%% blood_pressure_exact() evaluates the exact solution for blood_pressure_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 March 2022
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real T(:): the times.
%
%  Output:
%
%    real Y(:), the exact solution values.
%
  [ pdia, psys, pulse, q, told, t0, y0, tstop ] = blood_pressure_parameters ( );

  ca = blood_pressure_compliance ( );
  rs = blood_pressure_resistance ( );
  tpulse = 1.0 / pulse;
  tmod = mod ( t - t0, tpulse );
  y = psys * exp ( - tmod / ca / rs );

  return
end
