Error in using eigs: Error using arpackc, Expect 2 output arguments

7 vues (au cours des 30 derniers jours)
Fuwei Yang
Fuwei Yang le 17 Jan 2017
I was using function eigs but I met a problem:
[D,V]=eigs(F,E)
Error using arpackc
Expect 2 output arguments
Error in eigs (line 240)
arpackc( aupdfun, ido, ...
If I use eig instead of eigs, it will work correctly. My matlab virson is R2015b. What can I do to solve this? thank you very much!
  2 commentaires
Abhishek Kumar
Abhishek Kumar le 8 Avr 2018
Has the issue been resolved? I am getting the same error.
Walter Roberson
Walter Roberson le 8 Avr 2018
See my explanation below. This is not a Mathworks error, it is due to old code being in your path. Look for eigs and eigs_new

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 28 Juin 2017
I just got hit with this in a third-party package. Someone had taken a 2008 copy of MATLAB's eigs and copied it, perhaps with some modifications, and named the file eigs_new.m but did not even bother to rename the function inside the file. The calls in the code to arpackc were not written with any output arguments. It appears that at some point between 2008b and 2013a, the internal undocumented arpackc was modified to expect two outputs from the function call.
In other words, the cause of this problem is that you (somehow) are using an eigs source code that was written for an older version of MATLAB than you are using. Use
which -all eigs
to figure out which eigs.m you are picking up. What you should be picking up is in the MATLAB installation directory for your version in toolbox/matlab/sparfun/eigs.m . Find the file you are getting instead and move it out of the way or adjust your MATLAB path with pathtool so that you get version appropriate for your release instead.
  2 commentaires
Chi-Hao Wu
Chi-Hao Wu le 5 Août 2017
What a coincidence! The same error I got was also in a file named "eigs_new.m" whose function name inside was "eigs".
Walter Roberson
Walter Roberson le 5 Août 2017
It appears that at the time I was helping someone out with GeNcut

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown 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!

Translated by