Effacer les filtres
Effacer les filtres

Problems with savepath in R2023b

85 vues (au cours des 30 derniers jours)
Matt J
Matt J le 25 Sep 2023
Commenté : Scott Milster le 28 Fév 2024
I have just installed R2023b on two different machines. Both give the following problem, when trying to use savepath
>> addpath(pwd)
>> savepath
Warning: Unable to save path to file 'C:\Program Files\MATLAB\R2023b\toolbox\local\pathdef.m'. You can save your path to a different location
by calling SAVEPATH with an input argument that specifies the full path. For MATLAB to use that path in future sessions, save the path to
'pathdef.m' in your MATLAB startup folder.
> In savepath (line 238)
Any idea why this warning is issued and how to fix it?
  3 commentaires
Peter Nelson
Peter Nelson le 25 Sep 2023
I am seeing the same issue
Scott Milster
Scott Milster le 28 Fév 2024
I have a similar problem in that my path is messed up. I just had 2023b installed Monday and I found out yesterday that the command line can't find readlines.m, but when I type 'help readlines' the help portion shows up.

Connectez-vous pour commenter.

Réponse acceptée

Matt J
Matt J le 25 Sep 2023
Modifié(e) : Matt J le 25 Sep 2023
Tech Support advised running Matlab "As Administrator" and this did solve the problem.
  5 commentaires
Steven Lord
Steven Lord le 21 Déc 2023
FYI, I believe this is Bug Report 3092284.
Michael Vinskus
Michael Vinskus le 5 Fév 2024
Modifié(e) : Michael Vinskus le 6 Fév 2024
Same issue occurred w/ me running 2023b, Update 6 after a clean install today (05-FEB-2023). Issue may have been the presence of startup.m in the user MATLAB directory.

Connectez-vous pour commenter.

Plus de réponses (2)

Bruno Luong
Bruno Luong le 25 Sep 2023
Modifié(e) : Bruno Luong le 25 Sep 2023
On Windows to fix it you need to change the Security setup of the file pathdef.m Right Click on file, Properties, Tab Security, Select Users, then click on Edit, Check Full Control, Then Apply.
  1 commentaire
Tom le 9 Fév 2024
That was the easiest fix in my opinion - running as administrator works too.

Connectez-vous pour commenter.

Walter Roberson
Walter Roberson le 25 Sep 2023
Déplacé(e) : Walter Roberson le 25 Sep 2023
On a shared system, users should not have write access to pathdef.m inside the MATLAB installation directory.
If this is not a share system, you could try using File Explorer to set you as having write permission to the file. But it being Windows, I do not know if UAC would override that write access since it is a file living inside c:\Program Files . Easiest is to savepath to your userpath . Or change your preferences to point to a different folder; see https://www.mathworks.com/help/matlab/matlab_env/matlab-startup-folder.html
  1 commentaire
Rolfe Power
Rolfe Power le 25 Sep 2023
I don't think this is the issue here. There are valid reasons for setting the pathdef for all users and this worked in previous versions given the user attempting to set the path had admin privileges. Now, it prompts for these privileges then throws the warning seen above even when the change is approved.

Connectez-vous pour commenter.


En savoir plus sur Introduction to Installation and Licensing 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!

Translated by