Problem to load a path

조회 수: 11 (최근 30일)
Hugo Mendonça
Hugo Mendonça 2020년 1월 24일
댓글: Hugo Mendonça 2020년 1월 28일
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
Jakob B. Nielsen
Jakob B. Nielsen 2020년 1월 24일
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?
Hugo Mendonça
Hugo Mendonça 2020년 1월 27일
Thank you, Jakob.
As you said, it is not a pretty solution, but it avoids loading manually every time userpath.
Regards.

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

답변 (1개)

Cam Salzberger
Cam Salzberger 2020년 1월 24일
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
Cam Salzberger
Cam Salzberger 2020년 1월 27일
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
Hugo Mendonça
Hugo Mendonça 2020년 1월 28일
Thank you again, Cam!
I did something similarly. I've created a shortcut with Jakob's suggestion, so with a only click I have it.
Regards,
Hugo

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

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by