Array Management for Uncertain Objects
All of the uncertain system classes (
ufrd) may be multidimensional arrays. This is
intended to provide the same functionality as the LTI-arrays of the Control System Toolbox™ software. The command
size returns a row vector with the
sizes of all dimensions.
The first two dimensions correspond to the outputs and inputs of the system. Any
dimensions beyond are referred to as the array dimensions. Hence, if
szM = size(M), then
szM(3:end) are sizes of the array
For these types of objects, it is clear that the first two dimensions (system output and input) are interpreted differently from the 3rd, 4th, 5th and higher dimensions (which often model parametrized variability in the system input/output behavior).
umat objects are treated in the same manner.
The first two dimensions are the rows and columns of the uncertain matrix. Any dimensions
beyond are the array dimensions.
Reference Into Arrays
selects the outputs (rows) referred to by
Yidx and the inputs
(columns) referred to by
Uidx, preserving all of the array dimensions.
For example, if
[4 5 3 6 7], then (for
example) the size of
M([4 2],[1 2 4]) is
[2 3 3 6 7].
size(M,2)==1, then single
indexing on the inputs or outputs (rows or columns) is allowed. If
is a vector of integers, then
M(Sidx) selects the corresponding elements.
All array dimensions are preserved.
If there are
K array dimensions, and
idx1, idx2, ...,
idxK are vectors of integers, then
G = M(Yidx,Uidx,idx1,idx2,...,idxK)
selects the outputs and inputs referred to by
Uidx, respectively, and selects from each array dimension the
“slices” referred to by the
idx1, idx2,..., idxK index
length(Uidx), size(G,3) equals
length(idx1), size(G,4) equals
K array dimensions, and less than
K index vectors are used in doing the array referencing, then the
MATLAB® convention for single indexing is followed. For instance, suppose
[3 4 6 5 7 4]. The expression
G = M([1 3],[1 4],[2 3 4],[5 3 1],[8 10 12 2 4 20 18])
is valid. The result has
[2 2 3 3
7] . The last index vector
[8 10 12 2 4 20 18] is used to
reference into the 7-by-4 array, preserving the order dictated by MATLAB single indexing (e.g., the 10th element of a 7-by-4 array is the element in
the (3,2) position in the array).
Note that if
M has either one output (row) or one input (column),
M has array dimensions, then it is not allowable to combine single
indexing in the output/input dimensions along with indexing in the array dimensions. This
will result in an ambiguity in how to interpret the second index vector in the expression
(i.e., “does it correspond to the input/output reference, or does it correspond to
the first array dimension?”).