function pwc_bars_1d_test ( )

%*****************************************************************************80
%
%% pwc_bars_1d_test tests pwc_bars_1d.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    11 August 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'pwc_bars_1d_test\n' );
  fprintf ( 1, '  pwc_bars_1d display a piecewise\n' );
  fprintf ( 1, '  constant function of a 1D argument as a sequence of bars.\n' ); 
%
%  Define the piecewise constant function.
%
  x = [ 0.0,    4.0,    11.0,    13.0,    17.0 ];
  y = [     2.0,    4.0,     5.0,     2.0      ];
%
%  Get the sequence of points that can be used to draw the function.
%
  [ xp, yp ] = pwc_bars_1d ( x, y );
%
%  Call MATLAB to plot it.
%
  plot ( xp, yp, 'b-o', 'Linewidth', 3 );
  grid on
  title ( 'pwc\_bars\_1d piecewise constant plot.' );

  filename = 'pwc_bars_1d.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Saved graphics as "%s"\n', filename );

  return
end

