I have a feeling the Matlab aspect of this question is straightforward, but no one has answered it yet because it is difficult to follow your first paragraph. It seems that you have many levels and sub-levels and sub-sub levels of data, but it's hard to visualize the data structure or what you're trying to do.
Two actions that will help you get an answer:
- Draw a diagram of your data structure and directly indicate on the diagram what numerical values you're trying to get.
- Upload a .mat file with your data in it.