functioneigenValuesAsRealMatrix

Return eigenvalues for a real, nonsymmetric matrix in a Real representation (computation with optional balancing)

Extends from Modelica.Icons.Function (Icon for functions).

Information

Syntax

eigenvalues = Matrices.eigenValuesAsRealMatrix(A);

Description

This function call returns the eigenvalues of a square matrix A. The first column of "eigenvalues" contains the real and the second column contains the imaginary part of the eigenvalues. Before calculating the eigenvalues, matrix A is permuted and scaled (balanced) to improve the computation. For details see the lapack documentation.

Example

  Real A[3,3] = [1,2,3;
                 3,4,5;
                 2,1,4];
  Real eval[3,2];
algorithm
  eval := Matrices.eigenValuesAsRealMatrix(A);  // eval = [ 8.0  , 0;
                                                //         -0.618, 0;
                                                //          1.618, 0];

i.e., matrix A has the 3 real eigenvalues 8.0, -0.618, 1.618.

Inputs

TypeNameDefaultDescription
Real[:,size(A, 1)]AMatrix
Booleanbalancetrue=true, if A is balanced (pre-scaled) before computation of the eigen values

Outputs

TypeNameDefaultDescription
Real[size(A, 1),2]eigenvaluesEigenvalues of matrix A (Re: first column, Im: second column)