function monomial_value_test01 ( )

%*****************************************************************************80
%
%% MONOMIAL_VALUE_TEST01 tests MONOMIAL_VALUE on sets of data in various dimensions.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    17 August 2014
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'MONOMIAL_VALUE_TEST01\n' );
  fprintf ( 1, '  Use monomial_value() to evaluate some monomials\n' );
  fprintf ( 1, '  in dimensions 1 through 3.\n' );

  e_min = -3;
  e_max = 6;
  n = 5;
  seed = 123456789;
  x_min = -2.0;
  x_max = +10.0;

  for m = 1 : 3

    fprintf ( 1, '\n' );
    fprintf ( 1, '  Spatial dimension M =  %d\n', m );

    [ e, seed ] = i4vec_uniform_ab ( m, e_min, e_max, seed );
    i4vec_transpose_print ( m, e, '  Exponents:' );
    [ x, seed ] = r8mat_uniform_ab ( m, n, x_min, x_max, seed );
%
%  To make checking easier, make the X values integers.
%
    x = r8mat_nint ( m, n, x );
    v = monomial_value ( m, n, e, x );

    fprintf ( 1, '\n' );
    fprintf ( 1, '   V(X)         ' );
    for i = 1 : m
      fprintf ( 1, '      X(%d)', i );
    end
    fprintf ( 1, '\n' );
    fprintf ( 1, '\n' );
    for j = 1 : n
      fprintf ( 1, '%14.6g  ', v(j) );
      for i = 1 : m
        fprintf ( 1, '%10.4f', x(i,j) );
      end
      fprintf ( 1, '\n' );
    end

  end

  return
end
