function [ l, d ] = aegerter_ldlt ( n )

%*****************************************************************************80
%
%% aegerter_ldlt() returns the LDLT factors of the AEGERTER matrix.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 December 2019
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of rows and columns of A.
%
%  Output:
%
%    real L(N,N), D(N,N), the factors.
%
  l = zeros ( n, n );
  d = zeros ( n, n );

  for i = 1 : n
    l(i,i) = 1.0;
  end
  for j = 1 : n - 1
    l(n,j) = j;
  end

  for i = 1 : n - 1
    d(i,i) = 1.0;
  end
  d(n,n) = - n * ( 2 * n - 5 ) * ( n + 1 ) / 6;

  return
end

