String with mask parameter
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
julien dannenmayer
am 7 Okt. 2022
Kommentiert: julien dannenmayer
am 10 Okt. 2022
On my project, I am using a sub-system with a mask which takes a string as a parameter (typically called "topic_name").
Up to now that topic_name is always populated manually (i.e. typing the string whenever we create a new IO).
However, this is time consuming to maintain a system with multiple occurences where just a number changes in the string.
e.g. for the iteration of my "item1", I map various sub-systems with strings "item1/pump1", "item1/pump2", "item1/cold_valve", "item1/hot_valve"... Then I need to do the same with "item2", mapping strings "item2/pump1", "item2"/pump2", "item2/cold_valve", "item2/hot_valve". And so on with item3, item4, etc.
In short this is a nightmare to maintain, and since all items have the same structure, I would like to create a library block using a mask parameter "item_number" so that I can create the mapping once for pump1, pump2, cold_valve, hot_valve, then just populate the item_number for all the instances of item.
Can anyone explain what the syntax would be for itemitem_number/pump1?
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!