Compute the Hessenberg-triangular decomposition of the matrix pencil
(
a,
b)
, returning aa=
q*
a*
z, bb=
q*
b*
z, with q and z orthogonal. For example,[aa, bb, q, z] = qzhess ([1, 2; 3, 4], [5, 6; 7, 8]) aa = [ -3.02244, -4.41741; 0.92998, 0.69749 ] bb = [ -8.60233, -9.99730; 0.00000, -0.23250 ] q = [ -0.58124, -0.81373; -0.81373, 0.58124 ] z = [ 1, 0; 0, 1 ]The Hessenberg-triangular decomposition is the first step in Moler and Stewart's QZ decomposition algorithm.
Algorithm taken from Golub and Van Loan, Matrix Computations, 2nd edition.