필터 지우기
필터 지우기

Enumeration error after 2023a update

조회 수: 2 (최근 30일)
Ogul Can Yurdakul
Ogul Can Yurdakul 2023년 3월 21일
편집: Adam Danz 2023년 8월 16일
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!

채택된 답변

Ogul Can Yurdakul
Ogul Can Yurdakul 2023년 3월 21일
이동: the cyclist 2023년 3월 21일
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
Adam Danz
Adam Danz 2023년 3월 21일
편집: Adam Danz 2023년 8월 16일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by