function random_data_test24 ( )

%*****************************************************************************80
%
%% RANDOM_DATA_TEST24 tests UNIFORM_ON_ELLIPSOID_MAP.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    23 April 2013
%
%  Author:
%
%    John Burkardt
%
  m = 2;
  n = 200;
  seed = 123456789;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'RANDOM_DATA_TEST24\n' );
  fprintf ( 1, '  UNIFORM_ON_ELLIPSOID_MAP maps uniform\n' );
  fprintf ( 1, '  points onto an ellipsoid.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Spatial dimension M =         %12d\n', m );
  fprintf ( 1, '  Number of points N =          %12d\n', n );
  fprintf ( 1, '  Initial random number SEED =  %12d\n', seed );

  a = [ 3.0,  1.0; ...
        1.0,  2.0 ]';
  r = 1.0;

  [ x, seed ] = uniform_on_ellipsoid_map ( m, n, a, r, seed );

  fprintf ( 1, '  Final random number SEED =    %12d\n', seed );
%
%  Save data in a file.
%
  filename = 'uniform_on_ellipsoid_map.txt';
  r8mat_write ( filename, m, n, x );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Data written to "%s".\n', filename );
%
%  Make a plot.
%
  plot ( x(1,1:n), x(2,1:n), 'b.' )
  grid on
  axis equal
  title ( 'Data from uniform\_on\_ellipsoid\_map.m' )
  filename = 'uniform_on_ellipsoid_map.png';
  print ( '-dpng', filename );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Image written to "%s".\n', filename );
  return
end
