"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?
Stateflow String Output - cannot assign string type to variable
5 次查看(过去 30 天)
显示 更早的评论
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/288979/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/288980/image.png)
回答(1 个)
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
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!