function hankel_pds_cholesky_lower_test02 ( )

%*****************************************************************************80
%
%% HANKEL_PDS_CHOLESKY_LOWER_TEST02 tests HANKEL_PDS_CHOLESKY_LOWER.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    26 January 2017
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'HANKEL_PDS_CHOLESKY_LOWER_TEST02\n' );
  fprintf ( 1, '  HANKEL_PDS_CHOLESKY_LOWER computes a lower Cholesky\n' );
  fprintf ( 1, '  matrix L such that the matrix H = L * L'' is a\n' );
  fprintf ( 1, '  positive definite (symmetric) Hankel matrix.\n' );

  n = 5;
  lii = ones ( n, 1 );
  liim1 = ones ( n - 1, 1 );

  l = hankel_pds_cholesky_lower ( n, lii, liim1 );

  r8mat_print ( n, n, l, '  The Cholesky factor L:' );

  h = l * l';

  r8mat_print ( n, n, h, '  The Hankel matrix H = L * L'':' );

  l2 = chol ( h, 'lower' );

  r8mat_print ( n, n, l2, '  The Cholesky factor L2 of H:' );

  h2 = l2 * l2';

  r8mat_print ( n, n, h2, '  The Hankel matrix H2 = L2 * L2'':' );

  return
end
