functionhessenberg
Return upper Hessenberg form of a matrix
Extends from Modelica.Icons.Function (Icon for functions).
Information
Syntax
H = Matrices.hessenberg(A);
(H, U) = Matrices.hessenberg(A);
Description
Function hessenberg computes the Hessenberg matrix H of matrix A as well as the orthogonal transformation matrix U that holds H = U'*A*U. The Hessenberg form of a matrix is computed by repeated Householder similarity transformation. The elementary reflectors and the corresponding scalar factors are provided by function "Utilities.toUpperHessenberg()". The transformation matrix U is then computed by LAPACK.dorghr.
Example
A = [1, 2, 3;
6, 5, 4;
1, 0, 0];
(H, U) = hessenberg(A);
results in:
H = [1.0, -2.466, 2.630;
-6.083, 5.514, -3.081;
0.0, 0.919, -0.514]
U = [1.0, 0.0, 0.0;
0.0, -0.9864, -0.1644;
0.0, -0.1644, 0.9864]
and therefore,
U*H*transpose(U) = [1.0, 2.0, 3.0;
6.0, 5.0, 4.0;
1.0, 0.0, 0.0]
See also
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[:,size(A, 1)] | A | Square matrix A |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[size(A, 1),size(A, 2)] | H | Hessenberg form of A | |
| Real[size(A, 1),size(A, 2)] | U | Transformation matrix |
Revisions
- 2010/05/31 by Marcus Baur, DLR-RM