To reference the value of a field in a structure array, you
must index into the array to the structure of interest and then reference
that structure's field individually using dot notation, as in this
example:
To reference all the values
of a particular field for each structure in an array, use this notation
in a for
loop, as in this example:
This example uses the repmat
function
to define an array of structures, each with two fields a
and b
as
defined by s
. See Define Arrays of Structures for Code Generation for more information.