Using the C++ Math Library | ![]() ![]() |
Referencing into Nested Structures
Structures can contain other structures. For example, the image structure used in these examples contains a date
structure. To retrieve data from nested structures, nest calls to mwArray::field()
.
y = images(2).field("date").field("year")
;
y = images(2).date.year
performs the same operation in MATLAB.
![]() | Referencing a Single Structure in a Structure Array | Accessing the Contents of Structures Within Cells | ![]() |