function r8vec_variance_circular_test ( )

%*****************************************************************************80
%
%% R8VEC_VARIANCE_CIRCULAR_TEST tests R8VEC_VARIANCE_CIRCULAR.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 April 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8VEC_VARIANCE_CIRCULAR_TEST\n' );
  fprintf ( 1, '  R8VEC_VARIANCE_CIRCULAR computes the circular variance of an R8VEC.\n' );

  n = 10;
  a = - pi;
  b = + pi;
  seed = 123456789;
  [ x, seed ] = r8vec_uniform_ab ( n, a, b, seed );

  r8vec_print ( n, x, '  Uniform Vector in [-PI,+PI]:' );
  variance_circular = r8vec_variance_circular ( n, x );

  fprintf ( 1, '\n');
  fprintf ( 1, '  Circular variance: %g\n', variance_circular );

  n = 10;
  a = 0.0;
  b = 1.0;
  seed = 123456789;
  [ x, seed ] = r8vec_normal_ab ( n, a, b, seed );

  r8vec_print ( n, x, '  Normal vector, mean 0, variance 1' );

  variance_circular = r8vec_variance_circular ( n, x );

  fprintf ( 1, '\n');
  fprintf ( 1, '  Circular variance: %g\n', variance_circular );

  return
end
