setpath not working on 2015a
1 次查看(过去 30 天)
显示 更早的评论
Hi
I have upgraded to ML 2015a I wanted to add my toolboxes in the path but I always get an error that "pathdef.m" could not be saved as if I had not the rights to do it, even if I am running as Administrator. Even could not save it at any location in my PC - always denied permission. I have WIN 7 / 32 bits FYI, I have installed the new release under C:\Program Files\MATLAB\R2015a
0 个评论
采纳的回答
Jan
2015-6-20
I had the same problem with several other Matlab versions. When pathdef.m is inside the folder matlabroot\toolbox\local\ , only the system account has privileges to write, not the admin. But the admin can obtain the privileges for writing using the security tab of the folder's context menu. After providing the write access to the admin, addpath works successfully, when Matlab is started as an admin also.
Note that using pathdef.m inside the program folder concerns all users of this computer. Therefore a pathdef.m file in the userpath helps to avoid conflicts between users.
0 个评论
更多回答(1 个)
cwshep
2015-6-20
You shouldn't be modifying pathdef.m directly, as it says:
% DO NOT MODIFY THIS FILE. IT IS AN AUTOGENERATED FILE.
% EDITING MAY CAUSE THE FILE TO BECOME UNREADABLE TO
% THE PATHTOOL AND THE INSTALLER.
You should set your path by using "addpath" and "savepath" or "pathtool".
However, there is nothing that should be preventing you from modifying the pathdef.m file directly (I just checked on Win7/2015a). It is likely that it is being accessed by another program (perhaps java itself), and you just need to reboot to make sure nothing else has it locked.
0 个评论
另请参阅
类别
在 Help Center 和 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!