Loading multiple data from MATLAB several sublevel structured variable

Hello community,
As a way of optimizing my code, I am trying to avoid nasty for loops but I am afraid I have problem that cannot overcome.
To make it short, I have a certain n x m structure which contains information in two dimensions: A(:,:). Inside, at each slot, there's a 1x1 structure with several fields, e.g. a, b and c. At the same time, this fields contain several subfields (e.g. aa, bb and cc) which is the actual information that I have to retrieve. Such data is a vector.
In the end, I need to load the information of a certain subfield corresponding to all these n x m data points so that I have a loop that looks like:
for i=1:n
for j=1:m
DATA(i,j,:) = A(i,j).a.aa(:)
end
end
I cannot find an implicit way to do this, since trying to avoid the use of i and j indexes leads me to errors.
I would be very thankful if anyone could bring some fresh air to this storm :)
Thanks,
Javier

Answers (0)

Categories

Asked:

on 22 Feb 2016

Edited:

on 22 Feb 2016

Community Treasure Hunt

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

Start Hunting!