eigs and its behaviour
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone at Mathworks,
I'm using eigs in some algorithms that deal with real world data sets. These data result in square symmetric real matrices which might contain lots and lots of zeros; i.e. really sparse.
I some cases, due to different values of the parameters these matrices when passed to eigs yield the following error message:
>>
>> ...Error using eigs/processEUPDinfo (line 1329)
>> Error with ARPACK routine dneupd:
>> dnaupd did not find any eigenvalues to sufficient accuracy.
>>
>> Error in eigs (line 357)
>>flag = processEUPDinfo(nargout<3);
>>
Note that these matrices do not contain NaNs or inf values. Just +ve real values and zeros.
The problem is the way eigs interrupts the execution of the experiment running. As you can see, if it does not converge, it gives an error and stops all the experiment, loosing by that hours and hours of simulations. Even though I used the flag output variable, still the same behaviour.
As a programming trick, I tried eigs in a try/catch block which seems to work fine and avoids interrupting the execution of the hall experiment. However, I was wondering if there is a better solution for this problem. For instance, I would like to know, out of the k eigenvalue-eigenvector pairs, which one did not converge? retrieve the solution for the first k-1 eigenvalue-eigenvectors pairs (which converged), and hopefully make more use of the 'flag' variable without the need for a try/catch block and without stopping the hall experiment.
Thank you all.
Best,
-Karim
0 commentaires
Réponses (1)
Shashank Prasanna
le 5 Fév 2013
The high condition number of your matrix seems to be making convergence to the default tol=eps difficult. However, if you decrease the tolerance you should be able to find good results.
opts.tol = 1e-3;
[v3,d3] = eigs(A, K, 'lr', opts);
0 commentaires
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!