Concatenating multiple struct fields into a single matrix or array but maintaining dimensions
Show older comments
Hi,
I've got a struct question. I have read a lot of similar questions & answers online, but its just not what I am trying to do.
I have struct: s=A.B.C and in location C I have a 100 fields with different string names (ie name01, name02..). Each array is 128x57 of numbers.
I want to concatinate these arrays into one single matrix of 12800 x 57 (maintaining the two dimensions).
-if possible- I'd like to know how to concatinate 'everything' in s=A.B.C location. Although, I would be interested to know how I could do a for loop to pass through a list of string names (name01, name02...) as something more advanced.
I have tried cellfun but it concatinated all the values into 1 dimension. I think I'm missing something very small.
I have added a screenshot of what C location displays.
Thanks!
V

Accepted Answer
More Answers (0)
Categories
Find more on Structures 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!