dynamic naming of structures
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (2)
James Tursa
el 16 de Mayo de 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
el 17 de Mayo de 2022
0 votos
Categorías
Más información sobre Whos en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!