| Using the C++ Math Library | ![]() |
Referencing a Subset of the Contents of a Cell
To obtain a subset of a cell's contents, concatenate indexing expressions. For example, to obtain element (2,2) from the array in cell N{1,1}, use an indexing expression that concatenates an index that references the entire contents of a cell (using the mwArray cell() member function) with an index that references a portion of those contents (using standard indexing).
d = N.cell(1,1)(2,2);
d = N{1,1}(2,2) performs the same operation in MATLAB.
Note that the result d is a scalar array, not a cell array, and equal to 5.
| Referencing the Contents of a Cell | Indexing Nested Cell Arrays | ![]() |