function B = hessenberg(A)

% function B = hessenberg(A)
% similarity transformation to Hessenberg form

n = size(A,1);
for i=1:n-2;
  I = [i+1:n];
  c = A(I,i);
  A(I,:) = h_trf(A(I,:),c);
  A(:,I) = (h_trf(A(:,I)',c))';
end;
B = A;

