NLALIB: The function hhess implements Algorithm 18.2.

Example 18.9

Let A be the matrix of Example 18.8. The MATLAB commands use hhess to transform A to upper Hessenberg form and then verify that PAPT = H within expected roundoff error.

 >> [P H] = hhess(A);
 >> H
 H =
9-5.1832-0.014905-1.9323-0.63263
-11.57618.76111.6590.5625-3.7232
07.69880.015962.3683-3.1455
000.57652-0.613112.5435
000-0.461416.836

t0020

 >> norm(P*H*P’ - A)
 ans =
  2.1495e-014

18.4.1 Efficiency and Stability

Algorithm 18.2 requires 103n3si180_e flops for the computation of H. To build ...

Get Numerical Linear Algebra with Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.