function bernstein_poly_01_matrix_test ( )

%*****************************************************************************80
%
%% bernstein_poly_01_matrix_test() tests bernstein_poly_01_matrix().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    26 January 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'bernstein_poly_01_matrix_test():\n' );
  fprintf ( 1, '  bernstein_poly_01_matrix() is given M data values X,\n' );
  fprintf ( 1, '  and a degree N, and returns an Mx(N+1) matrix B such that\n' );
  fprintf ( 1, '  B(i,j) is the j-th Bernstein polynomial evaluated at the.\n' );
  fprintf ( 1, '  i-th data value.\n' );

  m = 5;
  x = linspace ( 0.0, 1.0, m );
  n = 1;
  b = bernstein_poly_01_matrix ( m, n, x );
  r8mat_print ( m, n + 1, b, '  B(5,1+1):' )

  m = 5;
  x = linspace ( 0.0, 1.0, m );
  n = 4;
  b = bernstein_poly_01_matrix ( m, n, x );
  r8mat_print ( m, n + 1, b, '  B(5,4+1):' )

  m = 10;
  x = linspace ( 0.0, 1.0, m );
  n = 4;
  b = bernstein_poly_01_matrix ( m, n, x );
  r8mat_print ( m, n + 1, b, '  B(10,4+1):' )

  m = 3;
  x = linspace ( 0.0, 1.0, m );
  n = 5;
  b = bernstein_poly_01_matrix ( m, n, x );
  r8mat_print ( m, n + 1, b, '  B(3,5+1):' )

  return
end

