Effacer les filtres
Effacer les filtres

setpath not working on 2015a

1 vue (au cours des 30 derniers jours)
Mathieu NOE
Mathieu NOE le 18 Juin 2015
Réponse apportée : Jan le 20 Juin 2015
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

Réponse acceptée

Jan
Jan le 20 Juin 2015
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.

Plus de réponses (1)

cwshep
cwshep le 20 Juin 2015
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.

Catégories

En savoir plus sur Search Path dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by