octave-maintainers
[Top][All Lists]
Advanced

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

Re: eigs behaviour for small matrices


From: David Bateman
Subject: Re: eigs behaviour for small matrices
Date: Mon, 25 Jul 2011 19:32:45 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11

On 07/24/2011 09:10 PM, Jordi GutiƩrrez Hermoso wrote:
> While porting Matlab code, I noticed that someone had used eigs for a
> 2x2 matrix, which produces an error to use eig instead. I patched the
> code to do that, but I inadverently introduced a bug because I forgot
> that eigs sorts its eigenvalues but eig does not.
> 
> Should eigs be patched to call eig for small matrices and just sort
> them? Also, for the case of when you need all eigenvalues, should eigs
> just silently call eig instead of warning about it?
> 
> - Jordi G. H.
> 

The sorting rules aren't that obvious as the order of the values
returned might be largest eignevalue first, smallest first or even
sorted relative to a distance from a particular eigenvalue. So if matlab
does this it might be better to relax the error in eigs-base.cc to a
warning and letter ARPACK do the work.

David




reply via email to

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