Problems with savepath in R2023b
이전 댓글 표시
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
Nick
2023년 9월 25일
The problem is new with R2023b, on the previous versions there were no warnings like that.
Peter Nelson
2023년 9월 25일
I am seeing the same issue
Scott Milster
2024년 2월 28일
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.
채택된 답변
추가 답변 (2개)
Bruno Luong
2023년 9월 25일
편집: Bruno Luong
2023년 9월 25일
2 개 추천
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.
Before

After

댓글 수: 1
Tom
2024년 2월 9일
That was the easiest fix in my opinion - running as administrator works too.
Walter Roberson
2023년 9월 25일
이동: Walter Roberson
2023년 9월 25일
1 개 추천
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
Rolfe Power
2023년 9월 25일
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.
카테고리
도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!