Specifications

Table Of Contents
Indexing Into LTI Arrays
5-21
The remaining indices specify the model coordinates within the array.
For example, if
sys is a 5-by-2 array of state-space models defined by
sys = rss(4,3,2,5,2);
youcanaccess(and display) themodellocatedin the (3,2) positionofthearray
sys by typing
sys(:,:,3,2)
If sys is a 5-by-2 array of 3-output, 2-input FRD models, with frequency vector
[1,2,3,4,5], then you can access the response data corresponding to the
middle frequency (3 rad/s), of the model in the (3,1) position by typing
sys(:,:,3,1,'frequency',3.0)
To access all frequencies of this model in the array, you can simply type
sys(:,:,3,1)
Single Index Referencing of Array Dimensions
You can 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 inthe eighth position if you were to list the 10 models in the
array by successively scanning through its entries along each of its columns.
For more information on single index referencing, see “Advanced Indexing”
under “M-File Programming” in the MATLAB online documentation.
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])