MATLAB cannot run this file because /Users/... shadows it in the current working folder.
98 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am getting the above error when I try to run a script (that works perfectly well on Windows and was written in OS X, mind you) in MATLAB after selecting the folder in which the script is kept as the MATLAB path. I don't know why this is causing trouble (I'm running the code on 10.10.5). What's the issue? I do not understand.
0 Kommentare
Antworten (1)
Walter Roberson
am 13 Jul. 2016
You have one of two cases (I would need to see the full message to decide which):
1) You are trying to run a script or function that is in a different directory, but your current directory has a script or function of the same name. The default MATLAB path automatically uses the current directory as the highest priority when it needs to search outside a file. You would need to rename the one in the current directory or you would need to cd to the other directory to run the other one; OR
2) You are trying to run a script or function in the current directory, but your MATLAB path has been set unusually to give priority to a different directory that also has a script or function of the same name. You would need to rename the one in the other directory or you would need to fix your MATLAB path. This situation is less common than the above, but can happen if you make direct assignments to a variable named path (or if you use addpath() with unusual options.)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!