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 MIT license.
%
%  Modified:
%
%    17 August 2014
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'monomial_value_test01():\n' );
  fprintf ( 1, '  monomial_value() evaluates some monomials\n' );
  fprintf ( 1, '  in dimensions 1 through 3.\n' );

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

  for m = 1 : 3

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

    e = randi ( [ e_min, e_max ], m );
    i4vec_transpose_print ( m, e, '  Exponents:' );
    x = x_min + ( x_max - x_min ) * rand ( m, n );
%
%  To make checking easier, make the X values integers.
%
    x = round ( 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
 
