MATLAB cannot run this file because /Users/... shadows it in the current working folder.
107 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Walter Roberson
le 13 Juil 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.)
Voir également
Catégories
En savoir plus sur Startup and Shutdown dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!