pathdef and resulting path very long

Hello,
I have a fresh installation of Matlab R2025b and I noticed a number of duplicate file warnings when opening Simulink in the style of:
Warning: Attempt to include duplicate file C:\Program Files\MATLAB\R2025b\Toolbox\simulink\ui\studio\config\m\+SLStudio\FileMenu.xml into Toolset .
> In simulink.toolstrip.internal.loadConfig
In simulink.toolstrip.internal.refreshConfig
In slCustomizer/refresh
In slCustomizer.callRefresh
In slCustomizer>@()slCustomizer.callRefresh()
In slCustomizer.staticRefresh
In sl_refresh_customizations
and
Warning: The toolset already has a feature named ModelAdvisorSupportsLibrary.
> In simulink.toolstrip.internal.loadConfig
In simulink.toolstrip.internal.refreshConfig
In slCustomizer/refresh
In slCustomizer.callRefresh
In slCustomizer>@()slCustomizer.callRefresh()
In slCustomizer.staticRefresh
In sl_refresh_customizatio
I tried to find the cause of this and saw that my path.m has over 2600 entries. Is this a normal size for a path.m and could it have anything to do with the warnings I encounter? (to be fair, it is a substantial installation with a number of toolboxes)
In my pathdef.m there are as many entries so
restoredefaultpath
does not change anything.
rehash toolboxcache
has no noticable effect either.
I noticed that the path includes many subfolders, not sure if that is normal behaviour, e.g:
C:\Program Files\MATLAB\R2025b\Toolbox\soc
C:\Program Files\MATLAB\R2025b\Toolbox\soc\blocks
C:\Program Files\MATLAB\R2025b\Toolbox\soc\customhardwaretarget
C:\Program Files\MATLAB\R2025b\Toolbox\soc\customhardwaretarget\registry
C:\Program Files\MATLAB\R2025b\Toolbox\soc\hardwareboards\alterasoc
C:\Program Files\MATLAB\R2025b\Toolbox\soc\hardwareboards\alterasoc\registry
....
Thanks for any help on the matter! :)

 Respuesta aceptada

Steven Lord
Steven Lord el 10 de Mzo. de 2026 a las 18:00
If you have a lot of products and/or add-ons in your installation, the path may have a lot of entries.
V = ver;
S = split(path, pathsep);
fprintf("With %d products available, the path has %d entries.\n", ...
numel(V), numel(S))
With 91 products available, the path has 2505 entries.
If you don't have a lot of products in your installation, did you call genpath on the toolbox subfolder of matlabroot or on a folder outside matlabroot with a lot of subfolders and/or a lot of nested subfolders?
If you want to restore the path to its factory-installed state, you could use restoredefaultpath -- though that's a big hammer. Read through its documentation carefully before using it.

1 comentario

Tim
Tim el 11 de Mzo. de 2026 a las 12:00
First of all, thank you for your help.
I have a large number of products installed, so the amount of path entries is normal after all. From my investigation (I begrudgingly admit, my investigation was asking Gemini) I expected fewer entries. I will either just have to find another explanation for the fllood of warnings when opening Simulink or accept them as part of my life, as Simulink seems to run just fine despite them.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.

Productos

Versión

R2025b

Preguntada:

Tim
el 10 de Mzo. de 2026 a las 11:05

Comentada:

Tim
el 11 de Mzo. de 2026 a las 12:00

Community Treasure Hunt

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

Start Hunting!

Translated by