How can I initialize a bus with a "stringtype" field using "Constant" blocks?
Mostra commenti meno recenti
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?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Composite Interfaces in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

