function showhesslu ( )
%
%% showhesslu() LU factors a 5-by-5 upper Hessenberg system without pivoting.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'showhesslu():\n' );

  disp('Steps through the LU factorization of a 5-by-5')
  disp('upper Hessenberg matrix.')
  n = 5;
  A = rand(n,n);
  A = triu(A,-1);
   [n,n] = size(A);
   v = zeros(n,1);
   for k=1:n-1
      Before = A
      v(k+1) = A(k+1,k)/A(k,k);
      disp(sprintf('Zero A(%1.0f,%1.0f)',k+1,k))
      disp(sprintf('Multiplier = %7.4f / %7.4f = %7.4f',A(k+1,k),A(k,k),v(k+1)))
      A(k+1,k:n) = A(k+1,k:n) - v(k+1)*A(k,k:n);
      After = A
   end
   U = A;

  return
end

