[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45153] eigs returning an incorrrect number of
From: |
Marco Caliari |
Subject: |
[Octave-bug-tracker] [bug #45153] eigs returning an incorrrect number of eigenvalues |
Date: |
Fri, 24 Mar 2017 09:37:24 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
Follow-up Comment #6, bug #45153 (project octave):
With reference to comment #4, the matrix is almost singular. Therefore, the
weird results are expected for 'sm' mode. In fact, it coincides with shift 0
and therefore OP is inv(A-0*I) which is almost singular. The singularity of A
is not detected (the estimated condition number is slightly larger than eps)
and the code does not break nor return a warning. The same happens on Matlab
and plain ARPACK.
Coming back to the original bug (number of eigenvalues), it is not correct to
simply remove the last one. In fact, it may happen it is not one of the
smallest in magnitude. Try
A = [1,1,zeros(1,8);...
-1,1,zeros(1,8);...
zeros(1,2),1,1,zeros(1,6);...
zeros(1,2),-4,1,zeros(1,6);...
zeros(1,4),1,1,zeros(1,4);...
zeros(1,4),-9,1,zeros(1,4);...
zeros(1,6),1,1,zeros(1,2);...
zeros(1,6),-16,1,zeros(1,2);...
zeros(1,8),1,1;...
zeros(1,8),-25,1];
[V, L] = eigs (A, 3, "sm")
So, we should sort the eigenvalues and then discard the opposite of the
required ones. I think this is also related to #47236. In a word, the fix
requires some time.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45153>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/