hess
Hessenberg form of a matrix.
Syntax
Section titled “Syntax”H = hess(A)[P, H] = hess(A)[P, H, Q, Z] = hess(A, B) % generalizedDescription
Section titled “Description”Reduces A to upper-Hessenberg form H (zeros below the first subdiagonal) via an orthogonal similarity transformation. With two outputs, also returns the orthogonal P such that A = P*H*P'.
The two-matrix form computes the generalized Hessenberg reduction: A = P*H*Q' and B = P*T*Z' where H is upper-Hessenberg and T is upper-triangular. Used as a preprocessing step in eigenvalue computations.
Examples
Section titled “Examples”[P, H] = hess(magic(4));norm(P*H*P' - magic(4)) % near-zero