3.12. Structure Arrays

Structures are collections of different kinds of data organized by named fields. These are similar to those available in other programming languages like C. Unlike arrays which contain elements of the same data type, the fields of a structure may include data of different types. For example, one field may contain a text string; another may store a number, third may be a numeric array and so on. But, like standard arrays, structures are also array oriented. A single structure is a 1-by-1 structure array. The MATLAB commands like size and repmat work with structure arrays just as they work with normal arrays.

3.12.1. Building Structure Arrays

A simple 1-by-1 structure array can be built by assigning data to individual fields ...

Get MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.