Borrar filtros
Borrar filtros

Enumeration error after 2023a update

2 visualizaciones (últimos 30 días)
Ogul Can Yurdakul
Ogul Can Yurdakul el 21 de Mzo. de 2023
Editada: Adam Danz el 16 de Ag. de 2023
I started getting the following error after I upgraded to 2023a:
Warning: Executing startup failed in matlabrc.
This indicates a potentially serious problem in your MATLAB setup, which should be resolved as soon as possible. Error detected was:
MATLAB:datatypes:InvalidEnumValueFor
Invalid enum value. Use one of these values: 'auto' | 'manual'.
Thank you in advance!

Respuesta aceptada

Ogul Can Yurdakul
Ogul Can Yurdakul el 21 de Mzo. de 2023
Movida: the cyclist el 21 de Mzo. de 2023
Fixed it. In my startup.m file, I set all LineWidth values to 1 in a for loop as follows:
lineWidth_list_factory = fieldnames(get(groot,'factory'));
index_lineWidth = find(contains(lineWidth_list_factory,'LineWidth'));
for i = 1:length(index_lineWidth)
default_name = strrep(lineWidth_list_factory{index_lineWidth(i)},'factory','default');
set(groot, default_name, 1);
end
Apparently a new property called defaultAxesGridLineWidthMode is added to the relevant list, and its value is either 'manual' or 'auto'. I fixed the issue with a simple if statement:
lineWidth_list_factory = fieldnames(get(groot,'factory'));
index_lineWidth = find(contains(lineWidth_list_factory,'LineWidth'));
for i = 1:length(index_lineWidth)
default_name = strrep(lineWidth_list_factory{index_lineWidth(i)},'factory','default');
if ~contains(default_name,'Mode')
set(groot, default_name, 1);
end
end
And the problem is fixed.
  1 comentario
Adam Danz
Adam Danz el 21 de Mzo. de 2023
Editada: Adam Danz el 16 de Ag. de 2023
Alternatively, to avoid the defaultAxesGridLineWidthMode, you could use endsWith instead of contains.
index_lineWidth = find(endsWith(lineWidth_list_factory,'LineWidth'));
A full implementation of this solution was shared in this thread.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by