matlab can't open m file

조회 수: 2 (최근 30일)
Ramadhan
Ramadhan 2018년 8월 6일
댓글: Stephen23 2018년 8월 6일
If I try opening a file or script by clicking on it from the command window, I get the following error:

답변 (1개)

Jan
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
Stephen23 2018년 8월 6일
"The solution is to avoid using the names of the built-in functions for user-defined functions"
The function which should be used before defining any variable name or function name:
which length -all

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by