Which files are read before startup.m?

1 vue (au cours des 30 derniers jours)
David Epstein
David Epstein le 25 Jan 2019
Whenever I start Matlab, I get two lines of error message in red. I would like to find out what is causing them and how to get rid of them. The first line in red says
"Warning: Name is nonexistent or not a directory:". The second line in red purports to be the name of a directory. (It was the name of a directory about a month ago, but I have since changed the directory structure of my file system, and that directory no longer exists.)
1) I have placed an fprintf statement as the first line of my startup.m file. This shows that the error occurs before startup.m is entered. It also shows that Matlab is reading the startup.m that I want it to read. I need to know what Matlab does before it tries to read "startup.m".
2) The startup.m file is in ~/matlab/ (Unix notation), and this is also the answer given by the Matlab command "which startup".
3) The response to userpath is a 0x0 cell.
4) I looked at Home > Environment > Set Path, and could see nothing that looks like the phantom directory that doesn't exist.
5) Does Matlab have a cache, enabling it to preserve user errors.

Réponse acceptée

David Epstein
David Epstein le 27 Jan 2019
The answer to my question is given at
One of the files read by Matlab before startup.m is pathdef.m.
In my case, pathdef.m referred to a non-existent directory. When I deleted that entry, everything started to work as expected.

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by