Hi,
I have a multi-layered structure A that include 3 structures (a, b and c) and and all of them contain 10 fieldnames with 10 rows and every cell further contains 10 double numbers mixed with nans.
Doing
yields the content of the first cell (10 double), but I cant seem to to be able to extract the entire fielname. Doing
c = cell2mat(struct2cell(A.b.fieldname1(1,1)))
yields the following error: Expected one output from a curly brace or dot indexing expression, but there were 10 results.
So how can I extract the data from this multi-layered structure ?
Thank you,
6 Comments
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/477212-how-to-extract-data-from-a-multi-layered-structure#comment_738028
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/477212-how-to-extract-data-from-a-multi-layered-structure#comment_738028
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/477212-how-to-extract-data-from-a-multi-layered-structure#comment_738045
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/477212-how-to-extract-data-from-a-multi-layered-structure#comment_738045
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/477212-how-to-extract-data-from-a-multi-layered-structure#comment_738048
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/477212-how-to-extract-data-from-a-multi-layered-structure#comment_738048
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/477212-how-to-extract-data-from-a-multi-layered-structure#comment_738049
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/477212-how-to-extract-data-from-a-multi-layered-structure#comment_738049
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/477212-how-to-extract-data-from-a-multi-layered-structure#comment_738055
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/477212-how-to-extract-data-from-a-multi-layered-structure#comment_738055
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/477212-how-to-extract-data-from-a-multi-layered-structure#comment_738057
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/477212-how-to-extract-data-from-a-multi-layered-structure#comment_738057
Sign in to comment.