Introduction to MATLAB & SIMULINK: A Project Approach, Third Edition

It has already been explained in Section 1.1 that in the newer versions of MATLAB, as in other higher programming languages, additional data structures besides classical numerical matrices are available.
In the following sections we discuss so-called structures and cell arrays in more detail.
These data structures are seldom called upon in the interactive mode. On the other hand, in MATLAB programming they allow constructions (see Section 1.6), which would be very intricate or entirely unrealizable using numerical fields. Thus, the full value of these data structures will only become clear to the reader after reading Section 1.6. In the following we shall just discuss the basic aspects of these constructions in the interactive mode.
Structures are fields (arrays) by which different types of data can be combined into a logical unit. Access to these data is obtained by names, rather than by numerical indexing as in the case of matrices.
We illustrate this with an example. Suppose we want to combine certain properties of a MATLAB graphic, such as
the title of the graphic,
the label on the x axis,
the label on the y axis,
the number of plots,
the colors of the plots,
whether a grid is set (yes= 1/no=0),
the x range to be displayed, and
the y range to be displayed.
This listing includes numbers, numerical vectors, and strings. A listing of this sort can, of course, no longer be represented...