Using the C Math Library | ![]() ![]() |
Accessing the Contents of a Structure Field
A structure field may contain another array. By performing additional indexing operations, you can access the data stored in that array. You must specify the field name and the type of indexing to perform on the array stored in that field:
For example, this code retrieves the first row of the image in the third structure:
mlfAssign(&n, mlfIndexRef(images, "(?).image(?,?)", mlfScalar(3), mlfScalar(1), mlfCreateColonIndex()));
n = x(3).image(1,:)
performs the same operation in MATLAB.
![]() | Accessing a Field | Assigning Values to a Structure Field | ![]() |