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

 Akzeptierte Antwort

Weitere Antworten (0)

Kategorien

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by