function h_to_monomial_matrix_test ( )

%*****************************************************************************80
%
%% h_to_monomial_matrix_test() tests h_to_monomial_matrix().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 March 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'h_to_monomial_matrix_test():\n' );
  fprintf ( 1, '  h_to_monomial_matrix() returns a matrix which\n' );
  fprintf ( 1, '  converts a physicist''s Hermite polynomial to monomial form.\n' );
  fprintf ( 1, '\n' );

  n = 6;
  H2M = h_to_monomial_matrix ( n );
  M2H = monomial_to_h_matrix ( n );
  I = H2M * M2H;
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Product of H2M and M2H should be identity matrix:\n' );
  fprintf ( 1, '\n' );
  disp ( I );

  for i = 0 : n - 1
    h = zeros ( n, 1 );
    h(i+1) = 1.0;
    m = H2M * h;
    label = sprintf ( '  Monomial form of h%d(x)', i );
    r8poly_print ( m, label );
  end

  return
end
