function brownian_test ( )

%*****************************************************************************80
%
%% brownian_test() tests brownian().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 August 2005
%
%  Author:
%
%    John Burkardt
%
  n = 100;
  d = 2;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'brownian_test():\n' );
  fprintf ( 1, '  brownian() generates Brownian motion points.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Spatial dimension D =   %12d\n', d );
  fprintf ( 1, '  Number of points N =    %12d\n', n );

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

  return
end
