How can I initialize a bus with a "stringtype" field using "Constant" blocks?
Ältere Kommentare anzeigen
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?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Composite Interfaces finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

