Clear Filters
Clear Filters

Why do I receive numerous nonexistent warnings after upgrade installation?

25 views (last 30 days)

Answers (1)

Benjamin Kraus
Benjamin Kraus on 15 Jul 2024 at 18:03
Edited: Benjamin Kraus on 15 Jul 2024 at 18:05
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.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!