Stateflow String Output - cannot assign string type to variable

조회 수: 3 (최근 30일)
Katarina Vuckovic
Katarina Vuckovic 2020년 4월 30일
답변: Chidvi Modala 2020년 6월 9일
I am trying to output a simple string from the stateflow. I did try changing the type of y in 'Model Explorer', but 'string' was not an option.
  댓글 수: 1
Katarina Vuckovic
Katarina Vuckovic 2020년 4월 30일
"string: String. Supported only in charts that use C as the action language." -> what does this mean and how do I use C in simulink?

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

답변 (1개)

Chidvi Modala
Chidvi Modala 2020년 6월 9일
Characters are not valid Simulink signal types - only numeric, fixed-point, enumerated and bus types (with elements of supported type) are supported. See Data Types supported by Simulink. You can refer to Type Cast Operations section in this page
MATLAB is the default action language syntax for new Stateflow charts. String data is not supported with MATLAB as the Action Language. To create a chart that uses C as the action language, execute the following
sfnew -c
You can refer to this page to know more about MATLAB and C as Action language

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by