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?

 Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 19 Jan 2024
Modifié(e) : MathWorks Support Team le 2 Fév 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:

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange

Produits

Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by