About Adding Lines to Your startup.m file

2 visualizaciones (últimos 30 días)
Salen Ley
Salen Ley el 22 de En. de 2022
Editada: Matt J el 22 de En. de 2022
I'm trying to add specific lines to my startup.m file to install a specific toolbox using MATLAB. However, I'm not able to find any startup.m file.
How can I add lines to my startup.m file? I'm a Mac user.

Respuestas (2)

Matt J
Matt J el 22 de En. de 2022
Editada: Matt J el 22 de En. de 2022
The startup.m file is not a file that ships with Matlab. It needs to be created by you. You can put it anywhere in your permanent Matlab path. By permanent, I mean folders that are automatically in your path when Matlab is launched. You can use savepath() or pathtool() to make a particular folder permanent.

Star Strider
Star Strider el 22 de En. de 2022
See the documentation on startup
I believe that it now has to be in (Windows machines):
C:\Users\<UserNAme>\Documents\MATLAB\startup.m
It cannot be in any of the subfolders, at least in my experience. Probably something similar in Mac.
At one time, it was necessary to add all the user-created subdirectories to the MATLAB path, so my startup.m file (that I created originally about 20 years ago and have modified a few times since) does that as well.

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by