Why do I receive numerous nonexistent warnings after upgrade installation?
조회 수: 1 (최근 30일)
이전 댓글 표시
댓글 수: 2
Walter Roberson
2024년 7월 12일
Use
restoredefaultpath; rehash toolboxcache
savepath
to get rid of the warning messages.
답변 (1개)
Benjamin Kraus
2024년 7월 15일
편집: Benjamin Kraus
2024년 7월 15일
Most likely you have a duplicate copy of pathdef.m that is shadowing the correct version. This can happen when you call savepath. The problem is that pathdef.m will only work with one MATLAB release, so when you upgrade this new pathdef.m is incompatible with the new MATLAB version.
To determine if this is the issue, check the output from this command:
which -all pathdef
One result should be located within your MATLAB installation directory (matlab\toolbox\local\pathdef.m). That is the official copy that is installed with each new MATLAB installation. The contents of this file are different for every MATLAB release, and the version from one MATLAB release won't work with a different MATLAB release.
If you have another result that is located in your personal directory (something like C:\Users\<username>\Documents\MATLAB\pathdef.m), that is most likely the issue. That file is shadowing the official copy, but is incompatible with the new MATLAB release.
@Walter Roberson's solution will replace the copy in your personal directory with a new duplicate of the official pathdef.m, but there are two issues with this approach:
- Any customizations you've made to the path will be lost.
- This is a temporary solution that will break again the next time you update MATLAB.
I recommend renaming or deleting the copy that is located in your personal directory.
- If you've never intetionally modified your MATLAB path, then you can just delete that copy. This will cause MATLAB to fall-back to the official pathdef.m. Because you've deleted your personal copy, this solution will continue working, even after you update MATLAB again.
- If you have intentionally modified your MATLAB path, then rename pathdef.m to something else. Check that MATLAB is working fine, then you may want to consider porting your path modifications into your new MATLAB. I personally recommend using startup.m plus addpath (i.e. call addpath from within a custom startup.m file). This will be more robust to updating MATLAB in the future. Once you've checked your personal (and renamed copy) of pathdef.m to make sure you are not losing personal additions to the path, you can delete that file.
댓글 수: 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!