Why is Stateflow producing an error when writing an array of buses with a string type
이전 댓글 표시
I'm currently building a stateflow model in order to convert a m-script based matlab function to have some sort of graphical representation to promote readability.
In doing so I'm getting an error at the first block stating that I have a variable that "contains and array of bus type with a string type element and is only support for read-only input data in this block."
This is entirely true as I am creating an array of buses and one element in the bus is a string type containing the name of the bus. This is done intentionally as this bus creates the parameters for a camera that I will be using in a scene later and I want to be able to incorporate as many cameras in the scene as I'd like (in this case just 2).
The variable in question is created by a script I'm running with coder.extrinsic and this script works perfectly acceptable in the standard Matlab workspace.
*I've added images as attachements for reference*
Looking through the documentation is looks like both simulink and stateflow support strings with no exception like this, so I would think this should work.
I don't know if this is an issue with the string, the string in the bus, or the bus in the array. I am open to different solutions and eleminating the string as long as I can reference my buses consistently and programmatically (converting a bus to a struct in code and then calling fields by name seems to work nicely in the workspace).
Any help on trying to understand what is going on and how I could either fix it or create a workaround would be greatly appreciated.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!