## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

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.576 18.761 11.659 0.5625 -3.7232 0 7.6988 0.01596 2.3683 -3.1455 0 0 0.57652 -0.61311 2.5435 0 0 0 -0.46141 6.836

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

### 18.4.1 Efficiency and Stability

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

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required