octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #42097] 64bit Slackware, eig returning incorre


From: Russell Carden
Subject: [Octave-bug-tracker] [bug #42097] 64bit Slackware, eig returning incorrect results
Date: Fri, 11 Apr 2014 17:06:26 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 conkeror/1.0pre

Follow-up Comment #5, bug #42097 (project octave):

Here is a cleaner example.  Note that for this particular matrix,
a correct eigenvalue decomposition is returned for A' but not for A.  This is
probably be due to the fact that A' is already upper Hessenberg, so that the
problem may lie in bringing A to upper Hessenberg form.

octave:1> A=[ 0 1 0 ; 0 0 1 ; 1  0 0 ]
A =

   0   1   0
   0   0   1
   1   0   0

octave:2> format long
octave:3> [V D]=eig(A)
V =

 Columns 1 and 2:

  -0.158836098085991 - 0.540780260472586i  -0.158836098085991 +
0.540780260472586i
   0.682327803828019 + 0.000000000000000i   0.682327803828019 -
0.000000000000000i
  -0.391621714024374 + 0.251771732042861i  -0.391621714024374 -
0.251771732042861i

 Column 3:

  -0.526062999881448 + 0.000000000000000i
  -0.358947411384288 + 0.000000000000000i
  -0.770982798781043 + 0.000000000000000i

D =

Diagonal Matrix

 Columns 1 and 2:

  -0.341163901914010 + 1.161541399997252i                                     
  0
                                        0  -0.341163901914010 -
1.161541399997252i
                                        0                                     
  0

 Column 3:

                                        0
                                        0
   0.682327803828019 + 0.000000000000000i

octave:4> A*V-V*D
ans =

 Columns 1 and 2:

  -0.000000000000000 + 0.000000000000000i  -0.000000000000000 -
0.000000000000000i
  -0.158836098085990 - 0.540780260472587i  -0.158836098085990 +
0.540780260472587i
  -0.000000000000000 + 0.000000000000000i  -0.000000000000000 -
0.000000000000000i

 Column 3:

   0.000000000000000 + 0.000000000000000i
  -0.526062999881449 + 0.000000000000000i
   0.000000000000000 + 0.000000000000000i

octave:5> [V D]=eig(A')
V =

 Columns 1 and 2:

   0.577350269189626 + 0.000000000000000i   0.577350269189626 -
0.000000000000000i
  -0.288675134594813 - 0.500000000000000i  -0.288675134594813 +
0.500000000000000i
  -0.288675134594813 + 0.500000000000000i  -0.288675134594813 -
0.500000000000000i

 Column 3:

  -0.577350269189626 + 0.000000000000000i
  -0.577350269189626 + 0.000000000000000i
  -0.577350269189626 + 0.000000000000000i

D =

Diagonal Matrix

 Columns 1 and 2:

  -0.500000000000000 + 0.866025403784439i                                     
  0
                                        0  -0.500000000000000 -
0.866025403784439i
                                        0                                     
  0

 Column 3:

                                        0
                                        0
   1.000000000000000 + 0.000000000000000i

octave:6> A
A =

   0   1   0
   0   0   1
   1   0   0

octave:7> A'*V-V*D
ans =

 Column 1:

  -2.22044604925031e-16 - 5.55111512312578e-17i
   1.11022302462516e-16 + 2.77555756156289e-17i
  -1.11022302462516e-16 + 3.33066907387547e-16i

 Column 2:

  -2.22044604925031e-16 + 5.55111512312578e-17i
   1.11022302462516e-16 - 2.77555756156289e-17i
  -1.11022302462516e-16 - 3.33066907387547e-16i

 Column 3:

  -2.22044604925031e-16 + 0.00000000000000e+00i
   4.44089209850063e-16 + 0.00000000000000e+00i
   1.11022302462516e-16 + 0.00000000000000e+00i

octave:8> 


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42097>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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