Problem to load a path
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, everyone!
I have a little issue with my Matlab. I run the release 2019b in OsX.
The problem is every time I start it, all of my paths previously saved is erased because Matlab cannot recognize a character in the path.
E.g.:
Warning: Name is nonexistent or not a directory: /Users/PolitXcnica ...
the X represents what is in the system "é".
As a result, I always have to load all of the paths when I start Matlab.
PS: I cannot change the name "Politécnica".
I appreciate any help.
2 Kommentare
Jakob B. Nielsen
am 24 Jan. 2020
Because I am a slob and have saved a bunch of subfunctions in a hundred different folders, I have taken to start all my scripts with
addpath(genpath('C:\Users\MYID\thetoplevelfolderofmyMATLAB'))
It is probably not pretty at all - but might work?
Antworten (1)
Cam Salzberger
am 24 Jan. 2020
I haven't seen this before, though it looks similar to this issue with opening files. If I were to guess at a solution...
This looks like it's your userpath that gets automatically added to the top of the MATLAB Search Path upon startup. If you don't store files there that need to be available on the search path, you can just remove it:
userpath('clear')
Alternatively, you could set up a different folder somewhere without a non-ASCII character on the full path to serve as your user path, and set it to use that in the future:
userpath('/some/other/folder')
-Cam
5 Kommentare
Cam Salzberger
am 27 Jan. 2020
Ah, I understand that the path is both required and unable to be renamed. In that case, since it seems like the addpath functionality works (it just won't persist the changes between sessions), you could add a "startup.m" file somewhere on the path (whatever part of the path does stay around), and call the addpath commands in that file. This is a little easier than remembering to "addpath" at the beginning of each script.
I would suggest contacting technical support to ensure that they understand the issue you have been encountering, and see if they are already aware of it, or if it's different from the bug-report I linked in my first post.
-Cam
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!