function [ xi, yi ] = interp_spline ( xd, yd, ni )

%*****************************************************************************80
%
%% interp_spline() evaluates a spline interpolant to data.
%
%  Discussion:
%
%    This program assumes that the file 'profile_data.txt' is available.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 January 2025
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Cleve Moler,
%    Numerical Computing with MATLAB,
%    SIAM, 2004,
%    ISBN13: 978-0-898716-60-3,
%    LC: QA297.M625. 
%
%  Input:
%
%    real xd(nd), yd(nd): data to be interpolated.  It is assumed that
%    there is a functional relationship y=f(x).
%
%    integer ni: the number of equally spaced interpolating arguments to use.
%
%  Output:
%
%    real xi(ni), yi(ni): equally spaced x arguments over the xd range,
%    and spline-interpolated values for y.
%

%
%  Evaluate the spline through the data.
%
  xi = linspace ( min ( xd ), max ( xd ), ni );
  yi = spline ( xd, yd, xi );

  return
end
