vector of structures
Las Estructuraes de Datos son variables que almacenasn mas de un valor. In order for it to make sense to store more than one value in avariable, the values should somehow
be logically related. There are many different kinds of data structures. We
have already been working with one kind, arrays (e.g., vectors andmatrices).
An array is a data structure in which all the values are logically related in that
they are of the same type, and represent in some sense the same thing. So far,
that has beentrue for the vectors and matrices that we have used.
A cell array is a kind of data structure that stores values of different types. Cell arrays
can be vectors or matrices; the differentvalues are stored in the elements of the
array. One very common use of a cell array is to store strings of different lengths.
Structures are data structures that group together valuesthat are logically
related, but are not the same thing and not necessarily the same type. The different
values are stored in separate fields of the structure.
One use of structuresis to set up a database of information. For example, for a class
a professor might want to store information for every student in the class: the student’s
name, university ID number,grades on all assignments and quizzes, and so
on. In many programming languages and database programs, the terminology is
that within a database file, there would be one record ofinformation for each student;
each separate piece of information (name, quiz 1 score, etc.) would be called
a field of the record. In the MATLAB® software these records are called structs.