function hcoef = monomial_to_hermite ( n, mcoef )

%*****************************************************************************80
%
%% monomial_to_hermite() converts from monomial to Hermite form.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 February 2024
%
%  Author:
%
%    John Burkardt.
%
%  Input:
%
%    integer n: the order of the polynomial.
%
%    real mcoef(1:n+1): the monomial coefficients of the polynomial.
% 
%  Output:
%
%    real hcoef(1:n+1): the Hermite coefficients of the polynomial.
%
  if ( n < 0 )
    return;
  end
%
%  Force mcoef to be a column vector!.
%
  mcoef = mcoef(:);
%
%  Get the matrix.
%
  A = monomial_to_hermite_matrix ( n + 1 );
%
%  Compute linear map.
%
  hcoef = A * mcoef;

  return
end
