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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Structures에 대해 자세히 알아보기

질문:

2016년 2월 22일

편집:

2016년 2월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by