Path(pathdef) Error

2 visualizaciones (últimos 30 días)
Samy Alkhayat
Samy Alkhayat el 5 de Dic. de 2023
Comentada: Samy Alkhayat el 11 de En. de 2024
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)

Respuestas (1)

Steven Lord
Steven Lord el 5 de Dic. de 2023
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 comentarios
Samy Alkhayat
Samy Alkhayat el 6 de Dic. de 2023
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 el 11 de En. de 2024
Hello Steven,
Any feedback on the last provided comment?

Iniciar sesión para comentar.

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by