Why does my "startup.m" file not work?
16 views (last 30 days)
Show older comments
MathWorks Support Team
on 18 Jan 2019
Edited: MathWorks Support Team
on 2 Feb 2024
I am having an issue where my "startup.m" file is not executing. I need it to set up the path for a particular script to run. I launch MATLAB and execute that script from a different program (so without "startup.m") I get the following error:
[Script/Function] is not found in the current folder or on the MATLAB path, but exists in: [Some other directory].
How can I ensure that my "startup.m" file will execute properly?
Accepted Answer
MathWorks Support Team
on 19 Jan 2024
Edited: MathWorks Support Team
on 2 Feb 2024
Is your "startup.m" file located at your userpath? If it is located somewhere else, you may not get the behavior that you are expecting.
To locate your "userpath", type:
>> userpath
To locate your "startup.m" file (if it is somewhere on your path), type:
>> which startup
The "userpath" is the standard location for the "startup.m" file. Here is the MATLAB Documentation page describing the use of a "startup.m" file:
0 Comments
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!