How can I initialize a bus with a "stringtype" field using "Constant" blocks?
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Composite Interfaces dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

