function chebyshev_interpolation_matrix_test ( )

%*****************************************************************************80
%
%% chebyshev_interpolation_matrix_test() tests chebyshev_interpolation_matrix().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    26 February 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'chebyshev_interpolation_matrix_test():\n' );
  fprintf ( 1, '  chebyshev_interpolation_matrix() computes the\n' );
  fprintf ( 1, '  chebyshev interpolation matrix C such that\n' );
  fprintf ( 1, '  given fd, values of f(x) on the Chebyshev Lobatto grid\n' );
  fprintf ( 1, '  the Chebyshev interpolant coefficients are fc = C*fd\n' );

  n = 5;
  x = chebyshev_lobatto_grid ( n );

  k = 3;
  fd = chebyshev_polynomial ( n, k, x );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  fd:\n' );
  disp ( fd );

  C = chebyshev_interpolation_matrix ( n );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  C:\n' );
  disp ( C )

  fc = C * fd;

  fprintf ( 1, '\n' );
  fprintf ( 1, '  fc:\n' );
  disp ( fc )

  return
end
