Why does my "startup.m" file not work?

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?

 Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 19 de En. de 2024
Editada: MathWorks Support Team el 2 de Feb. de 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:

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Productos

Versión

R2023b

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by