Error in eigs when using Matlab 2017b?

7 ビュー (過去 30 日間)
Emil Aggestam
Emil Aggestam 2018 年 1 月 18 日
回答済み: Christine Tobler 2018 年 1 月 24 日
Hi,
When I'm using eigs(A,B,K) in Matlab 2017b and receiving the following error:
Error: File: eigs.m Line: 1442 Column: 5
"c" previously appeared to be used as a function or command, conflicting with its use here as the name of a variable.
A possible cause of this error is that you forgot to initialize the variable, or you have initialized it implicitly using load or eval.
The code works with Matlab 2016b. What could be the problem when using Matlab 2017b?
Best regards, Emil
  8 件のコメント
the cyclist
the cyclist 2018 年 1 月 18 日
That didn't halt execution either (at least for me).
the cyclist
the cyclist 2018 年 1 月 19 日
編集済み: the cyclist 2018 年 1 月 19 日
Addendum: I do see the bug in R2017b. I did the wrong test earlier.

サインインしてコメントする。

採用された回答

Emil Aggestam
Emil Aggestam 2018 年 1 月 18 日
I had a file named c.m that caused the problem. Thank you!

その他の回答 (1 件)

Christine Tobler
Christine Tobler 2018 年 1 月 24 日
Thank you for pointing out this bug. There is now a bug report available where this can be tracked, and it will be fixed in a future version.
To address a discussion in the comments, the reason that the debugger wasn't helping is that this error is coming from the initial parsing of eigs.m, before the function is entered (similar to what happens for an "if" without an "end": the whole file is seen as inconsistent).

カテゴリ

Help Center および File ExchangeProgramming Utilities についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by