startup.m not found in local folder

my Matlab (2019a, but it happened also with previous versions) on Window10 does not find the custom startup.m that I put in the in the folder c:\Program Files\MATLAB\R2019a\toolbox\local\
The folder is in the path.
Any command there (including startupsav.m) is found, but not startup.m, even though is there. That is so strange.
The folder cannot be written without Administrator privilege but I force it to put the custom startup there, anyway.
Maybe that explains the unexpected behavior?
Thanks for the support
Paolo

 Respuesta aceptada

Steven Lord
Steven Lord el 3 de Abr. de 2019

1 voto

In previous releases, the toolbox path cache contained information about files in the toolbox subdirectory underneath matlabroot. As of release R2017b, the cache now contains information about files underneath matlabroot. Compare the documentation page about toolbox path caching in the current release and the same documentation page in the release R2017a documentation.
As stated on that documentation page: "We strongly recommend that you save any MATLAB code files you create and any files provided by MathWorks that you edit in a folder that is not in the matlabroot folder tree. If you keep your files in the matlabroot folder, then they might be overwritten when you install a new version of MATLAB." If you need to control where MATLAB starts, updating the properties of the shortcut is one way to do it. There are other ways as well.

Más respuestas (2)

per isakson
per isakson el 2 de Abr. de 2019
Editada: per isakson el 2 de Abr. de 2019

1 voto

This works for me. Have you set the "Start in" folder?
btw: I don't think it's a good idea to put startup.m in c:\Program Files\MATLAB\R2019a\toolbox\local\

2 comentarios

Paolo Canu
Paolo Canu el 3 de Abr. de 2019
Editada: Paolo Canu el 3 de Abr. de 2019
perfect solution! Thanks.
I'm using Matlab since so many years (guess more than 30 now..) and I was used to set startup .min the .../local folder. This comes as a surprise. But it's fine.
Hariharan
Hariharan el 15 de Mayo de 2025
where to find this properties options?

Iniciar sesión para comentar.

Athanasios Pittaras
Athanasios Pittaras el 11 de Feb. de 2020

0 votos

Matlab cannot "see" the startup file because of path caching. You need to update the cached path after you have added your startup.m file in the \toolbox\local folder, or switch off the caching completely which will make startup slower. Search for "Toolbox Path Caching in MATLAB" in the documentation about how to do all this.

Categorías

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

Productos

Versión

R2019a

Etiquetas

Preguntada:

el 2 de Abr. de 2019

Comentada:

el 15 de Mayo de 2025

Community Treasure Hunt

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

Start Hunting!

Translated by