Why does Matlab keep forgetting my path?
Show older comments
It seems that since around 3 ro 4 years ago, my current installation of matlab seems to regularly forget the directories I have manually added to the path. Several times i have called tech support and they do some chache clearing, path rebuilding and whatnot, and it is fixed. Then a few months later is is broke again. I can keep fixing it, but wondering why. I never had issues in the 20 years prior!
6 Comments
John D'Errico
on 17 Jan 2020
Probably a stupid question here, but a necesary one - do you save the path?
I might wonder if you have a corruption problem on your disk. Have you checked for that?
John D'Errico
on 17 Jan 2020
Please learn to use comments, not answers to make a comment.
"Yes, I do save it. And it seems to take, for a while..."
Todd Welti
on 17 Jan 2020
John D'Errico
on 18 Jan 2020
I can only wonder if this is not some sort of a file system interaction problem, as it has not been reported that I know of on Answers as an issue. At least is is clearly some sort of issue between MATLAB and your file system. For example, in the roughly 35 years I've been using MATLAB, I've never seen it happen to me, where the path has been lost.
What OS are you running? Has this problem been present across different MATLAB releases, since you say it has happened for several years?
Next, I wonder if we can pin down what release and OS you were using when it started to happen.
Are you running some other software that periodically goes through your file system, and "cleans" thing up?
Todd Welti
on 18 Jan 2020
Walter Roberson
on 18 Jan 2020
Historically, using the Add-On Explorer to add on files could result in a corrupt path. That would have been fixed a few releases ago, though.
Answers (1)
Andrew Janke
on 31 Jan 2020
1 vote
If I were you, I would give up on setting your path with pathtool or the Matlab GUI (since those try to change the path in the Matlab installation itself) and switch to configuring your path in a user startup.m file. Just stick addpath statements in your startup.m. That'll be more robust and a little "cleaner", since you can share your startup.m between different computers, and it'll work in cases where you don't have write access to the Matlab installation itself.
1 Comment
Todd Welti
on 31 Jan 2020
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!