Hi everyone,
I have an overarching structure, with nested substructure, in the following format:
overarching(k).nested
with k=1:8. These nested structures have different sizes, and I was trying to compute the size of each nested structure using structfun as follows:
nested_size=structfun(@size,overarching,'UniformOutput',0)
However, the input structure is non-scalar, and it does not work. I can get the size of each nested structure using a loop to iterate on the nested structures, but I would like to avoid loops if possible. Is there a way of doing this using structfun, that I am not aware of?
Thank you in advance for your help!
Best Answer