National Instruments 370760B-01 Calculator User Manual


 
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 variables are specified for 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 find returns the indices of the elements of a matrix which meet a user
defined criterion. By using a Boolean function of a matrix as the argument to find,the
an index to the entries satisfying the Boolean function can be generated. This function
works equally well for 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 to observe here. Both svd and max operate on pdmsaswellas
matrices. Refer to Section 3.2.4 for additional details. The variable idx isadataobject
known as an indexlist. In this case the indexlist has three columns: the domain index,
row index and column index. By selecting the domain 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