>  Docs Center  >  IDL Reference  >  Advanced Math and Stats  >  IMSL_EIGSYMGEN

IMSL_EIGSYMGEN

IMSL_EIGSYMGEN

The IMSL_EIGSYMGEN function computes the generalized eigenexpansion of a system Ax = λBx. The matrices A and B are real and symmetric, and B is positive definite.

This routine requires an IDL Advanced Math and Stats license. For more information, contact your sales or technical support representative.

The IMSL_EIGSYMGEN function computes the eigenvalues of a symmetric, positive definite eigenvalue problem by a three-phase process (Martin and Wilkinson 1971). Matrix B is reduced to factored form using the Cholesky decomposition. These factors are used to form a congruence transformation that yields a symmetric real matrix whose eigenexpansion is obtained. The problem is then transformed back to the original coordinates. Eigenvectors are calculated and transformed as required.

Examples


Example 1

This example computes the generalized eigenexpansion of a system Ax = λBx, where A and B are 3-by-3 matrices.

RM, a, 3, 3
; Define the matrix A.
row 0: 1.1 1.2 1.4
row 1: 1.2 1.3 1.5
row 2: 1.4 1.5 1.6
RM, b, 3, 3
; Define the matrix B.
row 0: 2 1 0
row 1: 1 2 1
row 2: 0 1 2
eigval = IMSL_EIGSYMGEN(a, b)
; Call IMSL_EIGSYMGEN to compute the eigenexpansion.
PM, eigval, Title = 'Eigenvalues'
; Output the results.
Eigenvalues
  1.38644
  -0.0583479
  -0.00309042

Example 2

This example is a variation of the first example. It computes the eigenvectors as well as the eigenvalues.

RM, a, 3, 3
; Define the matrix A.
row 0: 1.1 1.2 1.4
row 1: 1.2 1.3 1.5
row 2: 1.4 1.5 1.6
RM, b, 3, 3
; Define the matrix B.
row 0: 2 1 0
row 1: 1 2 1
row 2: 0 1 2
eigval = IMSL_EIGSYMGEN(a, b, Vectors = eigvec)
; Call IMSL_EIGSYMGEN with keyword Vectors to specify the named
; variable in which the vectors are stored.
PM, eigval, Title = 'Eigenvalues'
; Output the eigenvalues.
 
Eigenvalues
  1.38644
  -0.0583478
  -0.00309040
PM, eigvec, Title = 'Eigenvectors'
; Output the eigenvectors.
Eigenvectors
  0.643094 -0.114730 -0.681688
  -0.0223849 -0.687186 0.726597
  0.765460 0.717365 -0.0857800

Errors


Warning Errors

MATH_SLOW_CONVERGENCE_SYM: Iteration for an eigenvalue failed to converge in 100 iterations before deflating.

Fatal Errors

MATH_SUBMATRIX_NOT_POS_DEFINITE: Leading submatrix of the input matrix is not positive definite.

MATH_MATRIX_B_NOT_POS_DEFINITE: Matrix B is not positive definite.

Syntax


Result = IMSL_EIGSYMGEN(A, B [, /DOUBLE] [, VECTORS=array])

Return Value


One-dimensional array containing the eigenvalues of the symmetric matrix.

Arguments


A

Two-dimensional matrix containing symmetric coefficient matrix A.

B

Two-dimensional matrix containing the positive definite symmetric coefficient matrix B.

Keywords


DOUBLE (optional)

If present and nonzero, double precision is used.

VECTORS (optional)

Compute eigenvectors of the problem. A two-dimensional array containing the eigenvectors is returned in the variable name specified by VECTORS.

Version History


6.4

Introduced

See Also


IMSL_EIG, IMSL_GENEIG



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us