function correlation_test ( )

%*****************************************************************************80
%
%% correlation_test() tests correlation().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    18 August 2017
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'correlation_test():\n' );
  fprintf ( 1, '  correlation() computes the sample correlations of a signal.\n' );

  n = 101;
  x = linspace ( 0.0, 6.0 * pi, n );
  y = sin ( x );
  m = floor ( n / 10 );

  c = correlation ( n, y, m );

  r8vec_print ( m + 1, c, '  Correlations of y=sin(x) with lags 0, 1, 2, ...' );

  return
end
