[Scilab-users] Strange behaviour of eigs in new version 5.4

michael.baudin at contrib.scilab.org michael.baudin at contrib.scilab.org
Tue Oct 23 21:33:37 CEST 2012


Hi,

How do you know that the output of spec is correct ?

In theory, it is possible that both are wrong...

Here is my result (on Windows 32 bits) :

-->eigs(A,B,3,"SM")
  ans  =

     3.331D-16
     11.183884
     28.207091

-->spec(A,B)
  ans  =

     126.48866
     5.868D-15
     31.225951
     48.000134
     84.284743
     11.715411

Notice that the output of eigs is different, and that the smallest 
eigenvalue of spec is also different.

When I increase the number of iterations, it seems that the eigenvalues 
changes slightly :

-->opts.maxiter=3000
  opts  =

    maxiter: 3000

-->d = eigs(A, B, 3, "SM", opts)
  d  =

     3.331D-16
     13.964502
     24.24136

Also, when I run the algorithm twice, the output changes :

-->eigs(A, B, 3, "SM")
  ans  =

     3.331D-16
     11.943745
     16.273117

-->eigs(A, B, 3, "SM")
  ans  =

     3.331D-16
     10.417895
     18.461929

This is because the algorithm is initialized with a random vector, 
which changes everytime the algorithm is launched. In this example, the 
output is very sensitive to small changes in the initialization.

Did you compute the condition number associated with this generalized 
eigenvalue problem ?

For the "simple" eigenvalue problem, I know that the condition number 
of the problem depends on the condition number of the eigenvectors 
matrix (see, for example "Numerical computations in Matlab", section 
"10.6 Eigenvalue Sensitivity and Accuracy"). But I have no idea about 
the condition number of the generalized eigenvalue problem.

Best regards,

Michaël

Le 2012-10-16 06:57, Xuefeng LIU a écrit :
> Dear users and developers of SCILAB,
>
>
> I would to report two issues about eigs function in 5.4.
>
> 1) There come different results from spec and eigs. It seems that 
> eigs give
> false results.
>
> The example:
> -----------------------------------------
> A=[ 1.   -0.5    0.   -0.5    0.    0.   ;
>   -0.5    2.   -0.5    0.   -1.    0.   ;
>     0.   -0.5    0.5    0.     0.    0.   ;
>   -0.5    0.     0.     2.   -1.  -0.5  ;
>     0.   -1.     0.   -1.     2.    0.   ;
>     0.   0.     0.   -0.5    0.    0.5  ];
> B=[
>     0.0208333    0.0104167    0.           0.0104167    0.
> 0.
>     0.0104167    0.0625       0.0104167    0.0208333    0.0208333
> 0.
>     0.           0.0104167    0.0208333    0.           0.0104167
> 0.
>     0.0104167    0.0208333    0.           0.0625       0.0208333
> 0.0104167
>     0.           0.0208333    0.0104167    0.0208333    0.0625
> 0.0104167
>     0.           0.           0.           0.0104167    0.0104167
> 0.0208333 ];
>
> eigs(A,B,3,"SM")
>  ans  =
>     3.331D-16
>     13.120083
>     23.909112
>
> spec(A,B)
>  ans  =
>     126.48866
>     1.089D-15
>     31.225951
>     48.000134
>     84.284743
>     11.715411
> --------------------------------
> Enviorment: MAC 10.7.4, SCILAB 5.4
>
>
> 2) On Ubuntu systems(3.2.0-32-generic-pae), the installation of
> SCILAB from the
> package on SCILAB homepage has somethong wrong with the Arlnodi 
> Package. The
> executation of eigs gives error information on loading 
> libsciarnoldi.so.
>
>
> Xuefeng LIU
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users



More information about the users mailing list