Structs in struct, howto access?
Mostrar comentarios más antiguos
Hello,
I like to access a struct variable. A small example of the variable:
a(1).b.f1 = 11;
a(1).b.f2 = 12;
a(2).b.f1 = 21;
a(2).b.f2 = 22;
Now I like to access field f1 like:
a.b.f1
Matlab returns: Expected one output from a curly brace or dot indexing expression, but there were 2 results.
I expacted an output like
ans =
11
21
Is there a work around?
Thank you
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Workspace Variables and MAT Files 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!