Structs in struct, howto access?
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Workspace Variables and MAT Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!