User`s guide

4 Using MWArra y Classes
second syntax (int[] index) to return the element at the specified array of
one-based indices. The first syntax offers better performance than the second.
Input Parameters
fieldname
Field name of the requested element
index
Index of the requested element in the MWStructArray
In the case where index is of type int, the valid range for index is 1<=index
<= N
,whereN is the total number of elements in the array.
Inthecasewhere
index is of type int[],eachelementoftheindex vector
is an index along one dimension of the
MWStructArray object. T he valid
range for any index is
1 <= index[i] <= N[i],whereN[i] is the size of the
ith dimension.
element
New element to replace at index
If element is of type MWArray,thecellatindex is set t o a shared copy of the
underlying MATLAB array. Otherwise, a new MATLAB array is created from
element using d efault conversion rules and assigned to the cell at index.
Exceptions
The set method throws the following exception:
IndexOutOfBoundsException
The specified index parameter is invalid.
4-130