Error in using eigs: Error using arpackc, Expect 2 output arguments
조회 수: 10 (최근 30일)
이전 댓글 표시
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
Walter Roberson
2018년 4월 8일
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
채택된 답변
Walter Roberson
2017년 6월 28일
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
Chi-Hao Wu
2017년 8월 5일
What a coincidence! The same error I got was also in a file named "eigs_new.m" whose function name inside was "eigs".
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!