Which files are read before startup.m?

6 views (last 30 days)
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.

Accepted Answer

David Epstein
David Epstein on 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.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!