help-octave
[Top][All Lists]
Advanced

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

output from eig() is complex?


From: John W. Eaton
Subject: output from eig() is complex?
Date: Fri, 19 Jul 1996 15:19:59 -0500

On 19-Jul-1996, Mario Storti <address@hidden> wrote:

: I want to compute the eigenvalues of  a symmetric matrix and sort them
: as real  numbers  but   I  don't  obtained the  expected   result. For
: instance:
: 
: octave:7> A=rand(10);
: octave:8> A=A+A';
: octave:9> sort(eig(A))
: ans =
: 
:    0.0089208
:    0.5152296
:   -0.5608954
:   -0.6509429
:    0.9682804
:    1.5698353
:    1.9441555
:   -2.0148139
:   -2.5246725
:    9.5114825
: 
: My  interpretation is that  Octave is sorting   the vector by absolute
: value since this is the action for complex numbers, and in general the
: result from  the  eig()   operation   should be   a list  of   complex
: numbers.

Correct.

The problem is that Octave 1.1.1 doesn't do automatic type conversions
in some places that it should.  This problem should be fixed in the
next release.

Thanks,

jwe


reply via email to

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