function pwl_basis_1d_test ( )

%*****************************************************************************80
%
%% pwl_basis_1d_test() tests pwl_basis_1d().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 July 2015
%
%  Author:
%
%    John Burkardt
%
  nd = 4;
  ni = 21;

  xd = [ 0.0; 2.0; 5.0; 10.0 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'pwl_basis_1d_test():\n' );
  fprintf ( 1, '  pwl_basis_1d() evaluates the piecewise linear 1D basis\n' );
  fprintf ( 1, '  functions.\n' );

  x_min = 0.0;
  x_max = 10.0;
  xi = linspace ( x_min, x_max, ni );

  lb = pwl_basis_1d ( nd, xd, ni, xi );

  r8mat_print ( ni, nd, lb, '  The piecewise linear basis functions:' );

  return
end
