matlab can't open m file
2 ビュー (過去 30 日間)
古いコメントを表示
If I try opening a file or script by clicking on it from the command window, I get the following error:

0 件のコメント
回答 (1 件)
Jan
2018 年 8 月 6 日
編集済み: Jan
2018 年 8 月 6 日
It seems like you have redefined the function length and store it in a folder, which is saved on top of the path.
The solution is to avoid using the names of the built-in functions for user-defined functions. To reduce such collision, move the folder containing user-defined functions to the bottom of the path, such that the built-in functions are preferred.
Maybe this tool helps you to check the names of your M-files for collisions: FileExchange: UniqueFunNames
Your matlabrc function shows warnings during the startup of Matlab already. Because this runs before the path is included, you might have destroyed your Matlab installation. If cleaning up the path does not help, a re-installation of Matlab might be required.
1 件のコメント
Stephen23
2018 年 8 月 6 日
"The solution is to avoid using the names of the built-in functions for user-defined functions"
which length -all
参考
カテゴリ
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!