function [ l, u ] = moler1_lu ( alpha, n )

%*****************************************************************************80
%
%% moler1_lu() returns the LU factors of the MOLER1 matrix.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    28 October 2021
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    John Nash,
%    Compact Numerical Methods for Computers: Linear Algebra and
%    Function Minimisation,
%    Second Edition,
%    Taylor and Francis, 1990,
%    ISBN: 085274319X,
%    LC: QA184.N37.
%
%  Input:
%
%    real ALPHA, the parameter.
%
%    integer N, the order of the matrix.
%
%  Output:
%
%    real L(N,N), U(N,N), the PLU factors.
%
  l = zeros ( n, n );
  for j = 1 : n
    for i = 1 : n
      if ( i == j )
        l(i,j) = 1.0;
      elseif ( j < i )
        l(i,j) = alpha;
      else
        l(i,j) = 0.0;
      end
    end
  end

  u = zeros ( n, n );
  for j = 1 : n
    for i = 1 : n
      if ( i == j )
        u(i,j) = 1.0;
      elseif ( i < j )
        u(i,j) = alpha;
      else
        u(i,j) = 0.0;
      end
    end
  end

  return
end
