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?

 Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 19 Jan. 2024
Bearbeitet: MathWorks Support Team am 2 Feb. 2024

1 Stimme

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:

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by