.Modelica_LinearSystems2.Math.Matrices.hessenberg

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

Matrices.Utilities.toUpperHessenberg

Interface

function hessenberg
  import MatricesMSL = Modelica.Math.Matrices;
  input Real A[:, :] "Square matrix A";
  output Real H[size(A, 1), size(A, 2)] "Hessenberg form of A";
  output Real U[size(A, 1), size(A, 2)] "Transformation matrix";
end hessenberg;

Revisions

Date Author Comment
2010-05-31 Marcus Baur, DLR-RM Realization

Generated at 2024-04-28T18:16:21Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos