Loading multiple data from MATLAB several sublevel structured variable
Ältere Kommentare anzeigen
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
Antworten (0)
Kategorien
Mehr zu Structures finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!