Unable to Enumerated data with Chart in simulink
조회 수: 2 (최근 30일)
이전 댓글 표시
I have defined my class as shown below.
classdef(Enumeration) TrafficColors < Simulink.IntEnumType
enumeration
RED(0)
GREEN(10)
end
end
I am trying to use this in my chart in simulink, but I am not able to compile the code.
I am trying to assign a value to the variable defined in my chart with class at TrafficColor.
I have attached the copy of my code here.
Please advise.
댓글 수: 0
답변 (1개)
Arunkumar M
2018년 11월 13일
Try defining enumerated datatype in model workspace.
Then in stateflow, for the input, assign the datatype as this enumerated datatype.Now you will be able to use the enumerations.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!