Borrar filtros
Borrar filtros

Problem to load a path

8 visualizaciones (últimos 30 días)
Hugo Mendonça
Hugo Mendonça el 24 de En. de 2020
Comentada: Hugo Mendonça el 28 de En. de 2020
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 comentarios
Jakob B. Nielsen
Jakob B. Nielsen el 24 de En. de 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?
Hugo Mendonça
Hugo Mendonça el 27 de En. de 2020
Thank you, Jakob.
As you said, it is not a pretty solution, but it avoids loading manually every time userpath.
Regards.

Iniciar sesión para comentar.

Respuestas (1)

Cam Salzberger
Cam Salzberger el 24 de En. de 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 comentarios
Cam Salzberger
Cam Salzberger el 27 de En. de 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
Hugo Mendonça
Hugo Mendonça el 28 de En. de 2020
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

Iniciar sesión para comentar.

Categorías

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

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by