MATLAB Answers

Unable to Enumerated data with Chart in simulink

1 ビュー (過去 30 日間)
Claude Porlier
Claude Porlier 2014 年 10 月 30 日
Answered: Arunkumar M 2018 年 11 月 13 日
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 件のコメント

サインイン to comment.

件の回答 (1)

Arunkumar M
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 件のコメント

サインイン to comment.

サインイン してこの質問に回答します。


Translated by