Re: generalized eigenvectors [message #30234 is a reply to message #30232] |
Mon, 15 April 2002 14:29   |
Randall Skelton
Messages: 169 Registered: October 2000
|
Senior Member |
|
|
I am not sure I understand what you mean by a "Generalized Eigenvalue
problem".
IDL does have routines for computing the Eigenvalues and Eigenvectors.
From the IDL help:
EIGENQL - Compute eigenvectors of a real, symmetric array, given the array.
EIGENVEC - Compute eigenvectors of a real, nonsymmetric array, given
the array and its eigenvalues.
ELMHES - Reduce a real, nonsymmetric array to upper-Hessenberg form.
HQR - Compute the eigenvalues of an upper-Hessenberg array.
TRIQL - Compute eigenvalues and eigenvectors of a real, symmetric,
tridiagonal array.
TRIRED - Use Householder's method to reduce a real, symmetric array to
tridiagonal form.
Most of these methods are described in the Numerical recipies books.
See http://www.ulib.org/webRoot/Books/Numerical_Recipes/
In IDL the user must decide if the input matrix is symmetric or not then
use the appropriate tools. The Matlab EIG function basically uses the
same tools (to a first order), but automatically determines the "best"
method based on your input matrix... I personally find Matlab's auto-magic
approach to be more trouble than it is worth. Moreover, it promotes the
idea that you don't really need to understand the numerical problem you
are trying to solve...
The general approach is:
- If your matrix is real and symmetric, convert to the tridiagonal form
(TRIRED) and then use the QR procedure (TRIQL) to iteratively find the
eigenvalues/vectors from the tridiagonal array.
- If your matrix is real and not symmetric, reduce to Hessenberg form
using the Householder's transformation method (ELMHES) and then use the QR
procedure (HQR) to get the eigenvalues/vectors of the upper Hessenberg
matrix.
- Unfortunately, there is no built in IDL code for the QZ (Golub and Van
Loan, 1989) algorithm which can be modified to work for complex matricies.
Hope this helps,
Randall
On Mon, 15 Apr 2002, Tron Darvann wrote:
> I have a question concerning solving a GENERALIZED EIGENVALUE PROBLEM in
>
> IDL.
>
> Description of the problem:
> I need to find the eigenvalues and eigenvectors of
> Ax = kBx
> where both A and B are nXn matrices and k is a scalar.
>
> The solution to this can be computed in MATLAB by their "eig" function,
> which, according to their documentation uses a math/statistics software
> called lanpack.
>
> Question: Does IDL have a similar routine? Do you have any suggestions
> as to how to solve a generalized eigenvalue problem in IDL?
>
> Thanks in advance,
> Tron Darvann
>
> tdarvann@lab3d.odont.ku.dk
>
>
>
>
>
|
|
|