필터 지우기
필터 지우기

setpath not working on 2015a

조회 수: 1 (최근 30일)
Mathieu NOE
Mathieu NOE 2015년 6월 18일
답변: Jan 2015년 6월 20일
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

채택된 답변

Jan
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.

추가 답변 (1개)

cwshep
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.

카테고리

Help CenterFile Exchange에서 Search Path에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by