Error right-clicking on script/function name to open .m files

9 ビュー (過去 30 日間)
Chris Endemann
Chris Endemann 2019 年 1 月 31 日
回答済み: Chris Endemann 2019 年 2 月 1 日
I have run into a strange issue with Matlab 2018b that was not present during previous use. When I right-click on a highlighted script/function in Matlab editor and select 'Open', I get the following error:
Error using edit (line 66)
PATTERN must be a string scalar or character vector.
This happens with all .m files I try to open from the editor. Any ideas as to what the cause is and/or how to resolve? I've tried restarting Matlab, but that didn't solve it. I can still open the files manaully by dragging them into the editor or via the Open -> recent files.

採用された回答

Chris Endemann
Chris Endemann 2019 年 2 月 1 日
I figured out the source of the issue. I had another software package on my path that shadowed some vital matlab functions. After removing this package from my path, the issue is resolved.

その他の回答 (1 件)

Steven Lord
Steven Lord 2019 年 1 月 31 日
That suggests to me that you've overloaded something that is being called by the edit function. Do you happen to remember what files, if any, you created between the last time opening a highlighted script/function name using that menu option worked and the first time it failed?
If I had to guess I'd say it was probably something like open.
  1 件のコメント
Chris Endemann
Chris Endemann 2019 年 1 月 31 日
編集済み: Chris Endemann 2019 年 2 月 1 日
This problem occured while I was working with a fairly elaborate analysis pipeline that ouputs several large text files (that matlab writes out using sprintf) and a single small .mat file.

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

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by