필터 지우기
필터 지우기

Error in Simulink.d​efineIntEn​umType

조회 수: 3 (최근 30일)
TAB
TAB 2015년 10월 23일
답변: niklasnylen 2016년 10월 4일
Hi
While executing below function from enum definition with Matlab R2013B 64 Bit(Win7 64 bit):
Simulink.defineIntEnumType( 'My_Data_Type', ...
{'SOMETHING_NO', 'SOMETHING_YES'}, ...
[0, 1], ...
'Description', 'Type definition of Interior_SwStat_Type.', ...
'HeaderFile', 'My_Type.h',...
'AddClassNameToEnumNames', false);
I am getting this error
Error using Simulink.defineIntEnumType
Attempt to execute SCRIPT defineIntEnumType as a function:
C:\Program Files\MATLAB\R2013b\toolbox\simulink\simulink\+Simulink\defineIntEnumType.m
Error in MyFile_EnumTypes (line 2)
Simulink.defineIntEnumType( 'My_Data_Type', ...
I re-installed Matlab R2013B several times including all cleanups. But can not get rid of this error.
There is R2011B-32 bit also installed on same PC and function is working fine in this version.
Any suggestion will be appreciated.
  댓글 수: 1
Stephan Studener
Stephan Studener 2016년 2월 10일
I have the same problem. It does not occur in Matlab R2015b (64Bit) though.

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

답변 (1개)

niklasnylen
niklasnylen 2016년 10월 4일
The workaround for this bug seems to be to put the calls to Simulink.defineIntEnumType() in a function instead of a script. The enums will be added globally anyway.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by