Structs in struct, howto access?
显示 更早的评论
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
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Workspace Variables and MAT Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!