function lagrange_basis_coef_test ( )

%*****************************************************************************80
%
%% lagrange_basis_coef_test() tests lagrange_basis_coef().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    27 September 2014
%
%  Author:
%
%    John Burkardt
%
  npol = 5;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'lagrange_basis_coef_test():\n' );
  fprintf ( 1, '  lagrange_basis_coef() returns the coefficients\n' );
  fprintf ( 1, '  for a Lagrange basis polynomial.\n' );

  npol = 7;
  xpol = linspace ( -3.0, +3.0, npol );

  r8vec_print ( npol, xpol, '  Abscissas:' );

  for ipol = 1 : npol

    pcof = lagrange_basis_coef ( npol, ipol, xpol );

    s = sprintf ( '  L(%d)(x):', ipol );
    r8poly_print ( pcof, s );

  end

  return
end
