76 CHAPTER 3. FUNCTIONAL DESCRIPTION OF Xµ
Data can also be extracted by independent variable index number, by providing a scalar
argument to the pdm. In the following example the fifth through tenth and the
twentieth independent variablesare specifiedfor the smaller pdm,pdm2.
size(pdm1)
ans (a row vector) = 1 1 100
pdm2 = pdm1([5:10,20])
size(pdm2)
ans (a row vector) = 1 1 7
Indexing and Finding Data
The core function findreturns the indicesof the elements of a matrix which meet a user
defined criterion. By using a Boolean function of a matrix as the argumentto find,the
an index to the entries satisfying the Boolean function can be generated. Thisfunction
works equally wellfor for pdms.
This is illustrated in the following example.
# sys3g is a MIMO frequency response.
# We want to find the frequencies where the
# SVD of this response exceeds 1.
idx = find(max(svd(sys3g))>1)
domain(sys3g(idx(:,1)))
There are several points toobserve here. Bothsvd and max operate on pdmsaswellas
matrices. Refer to Section 3.2.4 for additional details. Thevariable idx isadataobject
known as an indexlist. In this case the indexlist has three columns: thedomain index,
row index and column index. By selecting the doma in index the appropriate sub-pdm
can be selected.
The indexlist command creates the indexlist data object from a given three column
matrix. The indexlist data type can also be used for assigning data to part of a pdm.
This is illustrated in the following example.
# Assign the row 2, column 1 element of the 4th domain