Programming Previous page   Next Page

Cell Arrays of Structures

Use cell arrays to store groups of structures with different field architectures:

Cell 1 of the cStr array contains a structure with two fields, one a string and the other a vector. Cell 2 contains a structure with three vector fields.

When building cell arrays of structures, you must use content indexing. Similarly, you must use content indexing to obtain the contents of structures within cells. The syntax for content indexing is

For example, to access the label field of the structure in cell 1, use cStr{1}.label.

Previous page  Converting Between Cell and Numeric Arrays Function Summary Next page

© 1994-2005 The MathWorks, Inc.