필터 지우기
필터 지우기

Path(pathdef) Error

조회 수: 3 (최근 30일)
Samy Alkhayat
Samy Alkhayat 2023년 12월 5일
댓글: Samy Alkhayat 2024년 1월 11일
Hello Community,
I get an error when I execute below. Can you please direct to what could go wrong with pathdef and the resolution of this error?
Thank you in advance!
>> Run_Script
Index exceeds matrix dimensions.
Error Run_Script (line 2)
path(pathdef)

답변 (1개)

Steven Lord
Steven Lord 2023년 12월 5일
Does your Run_Script script file define a variable named path on line 1, right before it tries to call the path function on line 2? [I suspect it does.] As long as that variable exists MATLAB cannot call the path function.
Changing the name of that variable would resolve the problem, but a script file trying to reinitialize the MATLAB search path as part of its execution smells kind of bad to me. Why is your script trying to do that?
  댓글 수: 4
Samy Alkhayat
Samy Alkhayat 2023년 12월 6일
Yes, here is what it returns:
C:\Software\Mathworks\Matlab_All_Products_2017a\toolbox\matlab\codetools\@mtree\path.m % Shadowed mtree method
C:\Software\Mathworks\Matlab_All_Products_2017a\toolbox\driving\driving\@drivingScenario\path.m % Shadowed drivingScenario method
C:\Software\Mathworks\Matlab_All_Products_2017a\toolbox\matlab\general\path.m % Shadowed
Samy Alkhayat
Samy Alkhayat 2024년 1월 11일
Hello Steven,
Any feedback on the last provided comment?

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

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by