User`s guide

Table Of Contents
Indexing Into LTI Arrays
4-21
For example, if sys is a 5-by-2 a rray of state-space models defined by
sys = rss(4,3,2,5,2);
youcan access(and display)the modelloc ated inthe(3,2) positionofthearray
sys by typing
sys(:,:,3,2)
If sys is a 5-by-2 array o f 3-output, 2-input FRD models, with frequency vector
[1,2,3,4,5], the n you ca n access the re spo nse data correspon din g to the
middle frequency (3 rad/s), of the model in the (3,1) position b y typing
sys(:,:,3,1,'frequency',3.0)
To access all frequencies of this model in the array, yo u can s imply type
sys(:,:,3,1)
Single Index Referencing of Array Dimensions
You ca n also access models using single index referencing of the array
dimensions.
For example, in the 5-by-2 LTI array
sys above, you can also access the model
locatedinthe
(3,2) position by typing
sys(:,:,8)
since this model is in the eighth position if you were to list the 10 models in the
array by successively scanning through its entries along each of its columns.
Formore information onsingle index referencing,see the “AdvancedIndexing”
section of Chapter 10, “M-File Programming” in Using MATLAB.
Extracting LTI Arrays of Subsystems
To select a particular subset of I/O channels from all the models in an LTI
array, use the syntax described in “Extracting and Modifying Subsystems” on
page 3-5. For example,
sys = rss(4,3,2,5,2);
A = sys(1, [1 2])
or equivalently,
A = sys(1,[1 2],:,:)