dynamic naming of structures
Ältere Kommentare anzeigen
If I have a variable x='name', how can I use x to build a structure with name 'name' that looks like:
name.a
name.b
No need to tell me about the hazards of dynamic variable naming.
Thanks.
Akzeptierte Antwort
Weitere Antworten (2)
James Tursa
am 16 Mai 2022
Would it be acceptable to use x as a dynamic fieldname instead of the top level variable name? E.g.,
v.(x).a
v.(x).b
DrK
am 17 Mai 2022
0 Stimmen
Kategorien
Mehr zu Whos 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!