How can I initialize a bus with a "stringtype" field using "Constant" blocks?
이전 댓글 표시
I am using MATLAB R2022a and I have a "Bus" type which contains some string fields (data type "stringtype(XX)", where XX is a known maximum length). I need to initialize this bus type in my model; however, if I try to use a "Constant" block with a zero value to initialize the bus, I receive the following error:
The 'Constant' block cannot produce a non-virtual bus output containing strings. A non-virtual bus containing strings is connected to output port 0 of block '<model_name>/Constant'.
Is there a way to initialize buses with stringtype fields, either using the "Constant" block or by another method?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Composite Interfaces에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

