octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eig function project


From: Ed Meyer
Subject: Re: eig function project
Date: Thu, 18 Apr 2013 12:23:35 -0700




On Thu, Apr 18, 2013 at 11:46 AM, Rafael Gonzalez <address@hidden> wrote:
I did some research about the way Matlab does the eig function and I got this table:

Case
Routine
Real symmetric A
DSYEV
Real nonsymmetric A:

  • With preliminary balance step
DGEEV (with SCLFAC = 2 instead of 8 in DGEBAL)
  • d = eig(A,'nobalance')
DGEHRDDHSEQR
  • [V,D] = eig(A,'nobalance')
DGEHRDDORGHRDHSEQRDTREVC
Hermitian A
ZHEEV
Non-Hermitian A:

  • With preliminary balance step
ZGEEV (with SCLFAC = 2 instead of 8 in ZGEBAL)
  • d = eig(A,'nobalance')
ZGEHRDZHSEQR
  • [V,D] = eig(A,'nobalance')
ZGEHRDZUNGHRZHSEQRZTREVC 
Real symmetric A
symmetric positive definite B.
DSYGV
    Special case:
    eig(A,B,'qz') for real A
    (same as real nonsymmetric A, real
    general B)

DGGEV

Real nonsymmetric A, real general B
DGGEV
Complex Hermitian A,
Hermitian positive definite B.
ZHEGV
    Special case: 
    eig(A,B,'qz') for complex A or B
    (same as complex non-Hermitian A,
    complex B)

ZGGEV

Complex non-Hermitian A, complex B
ZGGEV


It seems to me that matching this logic with the proper LAPACK subroutine call in the init function of the EIG and FloatEIG classes a Matlab-complaint eig function can be achieved. Any comments on this?

A reference on why balancing is sometimes harmful:

http://www.math.wsu.edu/faculty/watkins/pdfiles/balbad.pdf

And yikes! I just discovered that dgeev does scaling and permutation ('B' arg to dgebal)
unlike dggev which only does permutations ('P' arg to dggbal). I'm going to ask
the lapack folks about this - I gave them a case years ago which failed due to
balancing.
--
Ed Meyer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]