function pwc_patch_1d_test ( )

%*****************************************************************************80
%
%% pwc_patch_1d_test() tests pwc_patch_1d().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 April 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'pwc_patch_1d_test():\n' );
  fprintf ( 1, '  pwc_patch_1d() displays a piecewise\n' );
  fprintf ( 1, '  constant function of a 1D argument as a color patch plot.\n' ); 
%
%  N is the number of intervals.
%
  n = 20;
%
%  Select N-1 internal nodes.
%
  x = rand ( n - 1, 1 );
%
%  Add nodes at 0 and 1, then shift to [5,10].
%
  x = 5.0 + 5.0 * [ 0.0; x; 1.0 ];
%
%  Sort the nodes.
%
  x = sort ( x );
%
%  Let Y be the width of each interval.
%
  y = x(2:n+1) - x(1:n);
%
%  Request a plot.
%
  pwc_patch_1d ( x, y );

  return
end

