Why do I receive numerous nonexistent warnings after upgrade installation?

1 回表示 (過去 30 日間)
Hal Gilbert
Hal Gilbert 2024 年 7 月 12 日
編集済み: Benjamin Kraus 2024 年 7 月 15 日
  2 件のコメント
Walter Roberson
Walter Roberson 2024 年 7 月 12 日
Use
restoredefaultpath; rehash toolboxcache
savepath
to get rid of the warning messages.
Hal Gilbert
Hal Gilbert 2024 年 7 月 13 日
Works perfectly. Thank you.

サインインしてコメントする。

回答 (1 件)

Benjamin Kraus
Benjamin Kraus 2024 年 7 月 15 日
編集済み: Benjamin Kraus 2024 年 7 月 15 日
To build on what @Walter Roberson said:
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
/MATLAB/toolbox/local/pathdef.m
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:
  1. Any customizations you've made to the path will be lost.
  2. 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.

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by