Borrar filtros
Borrar filtros

Why do I receive numerous nonexistent warnings after upgrade installation?

25 visualizaciones (últimos 30 días)
Hal Gilbert
Hal Gilbert el 12 de Jul. de 2024 a las 22:27
Editada: Benjamin Kraus el 15 de Jul. de 2024 a las 18:05
  2 comentarios
Walter Roberson
Walter Roberson el 12 de Jul. de 2024 a las 22:33
Use
restoredefaultpath; rehash toolboxcache
savepath
to get rid of the warning messages.

Iniciar sesión para comentar.

Respuestas (1)

Benjamin Kraus
Benjamin Kraus el 15 de Jul. de 2024 a las 18:03
Editada: Benjamin Kraus el 15 de Jul. de 2024 a las 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.

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Productos


Versión

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by