Error in using eigs: Error using arpackc, Expect 2 output arguments
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Fuwei Yang
il 17 Gen 2017
Commentato: Walter Roberson
il 8 Apr 2018
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 Commenti
Walter Roberson
il 8 Apr 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
Risposta accettata
Walter Roberson
il 28 Giu 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 Commenti
Chi-Hao Wu
il 5 Ago 2017
What a coincidence! The same error I got was also in a file named "eigs_new.m" whose function name inside was "eigs".
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Startup and Shutdown in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!