function error_frobenius = lu_error ( n, a, l, u )

%*****************************************************************************80
%
%% lu_error() determines the error in an LU factorization.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 November 2013
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the order of the matrix.
%
%    real A(N,N), the matrix.
%
%    real L(N,N), U(N,N), the LU factors.
%
%  Output:
%
%    real ERROR_FROBENIUS, the Frobenius norm
%    of the difference matrix A - L * U.
%
  error_frobenius = norm ( a - l * u, 'fro' );

  return
end
