How can I fix my Matlab Installation to change the pathdef.m accessible?

조회 수: 232 (최근 30일)
Lataya O
Lataya O 2021년 2월 16일
편집: NgoiKH 2022년 2월 19일
Previously accessible file "C:\Program Files\MATLAB\R2019b\toolbox\local\pathdef.m" is now inaccessible.
Warning: MATLAB did not appear to successfully set the search path. To recover
for this session of MATLAB, type "restoredefaultpath;matlabrc". To find out how
to avoid this warning the next time you start MATLAB, type "docsearch problem
path" after recovering for this session.
Warning: Initializing Java preferences failed in matlabrc.
This indicates a potentially serious problem in your MATLAB setup, which should
be resolved as soon as possible. Error detected was:
MATLAB:UndefinedFunction
Unrecognized function or variable 'initdesktoputils'.
Undefined function 'usejava' for input arguments of type 'char'.
Warning: MATLAB did not appear to successfully set the search path. To recover
for this session of MATLAB, type "restoredefaultpath;matlabrc". To find out how
to avoid this warning the next time you start MATLAB, type "docsearch problem
path" after recovering for this session.

답변 (1개)

Jemima Pulipati
Jemima Pulipati 2021년 2월 19일
Hello,
To resolve this issue, please follow these steps:
1) At the MATLAB Command Window, execute the following commands:
>> restoredefaultpath
>> rehash toolboxcache
>> matlabrc
>> savepath
- These commands will cause a new file, "pathdef.m", to be created.
- You should now be able to relaunch MATLAB without seeing those warning / error messages.
Another troubleshooting step is:
2. This can occur if you do not have write permissions on the folder where MATLAB is installed.
To resolve this issue, open terminal and run the appropriate command to recursively change the user's permissions on the MATLAB folder to read/write/execute:
sudo chmod -R 755 ./MATLAB
Use the above mentioned method on any Unix/Linux based operating system.
For windows, please refer to the below mentioned link:
  댓글 수: 5
Image Analyst
Image Analyst 2021년 9월 15일
Try running MATLAB as administrator. If all else fails, try installing MATLAB not under Program Files, or calling tech support and asking for free installation help.
NgoiKH
NgoiKH 2022년 2월 19일
편집: NgoiKH 2022년 2월 19일
it works!!! THANKS!!!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile 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!

Translated by