function uniform_walk_test ( )

%*****************************************************************************80
%
%% uniform_walk_test() tests uniform_walk().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 April 2022
%
%  Author:
%
%    John Burkardt
%
  n = 400;
  d = 2;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'uniform_walk_test():\n' );
  fprintf ( 1, '  uniform_walk() generates points on a uniform random walk\n' );
  fprintf ( 1, '  of fixed steps in coordinate directions.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of points N =    %12d\n', n );
  fprintf ( 1, '  Spatial dimension D =   %12d\n', d );

  p = uniform_walk ( n, d );
%
%  Make a plot.
%
  clf ( );
  hold ( 'on' );
    plot ( p(:,1), p(:,2), 'k-' );
    plot ( p(:,1), p(:,2), 'b.' );
    plot ( p(1,1), p(1,2), 'g.', 'markersize', 15 );
    plot ( p(n,1), p(n,2), 'r.', 'markersize', 15 );
  hold ( 'off' );
  grid ( 'on' );
  axis ( 'equal' );
  xlabel ( '<--- X --->' );
  ylabel ( '<--- Y --->' );
  title ( 'uniform\_walk() (2D)' );
  filename = 'uniform_walk.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s".\n', filename );

  return
end
