Specifications

Table Of Contents
5 Arrays of LTI Models
5-10
Note the following when using the size function:
By convention, a single LTI model is treated as a 1-by-1 array of models.
For single LTI models, size returns only the I/O dimensions
[Ny Nu].
For LTI arrays, size always returns at least two array dimensions. For
example, the size of a 2-by-1 LTI array in
[Ny Nu 2 1]
size ignores trailing singleton dimensions beyond the second array
dimension.Forexample,
size returns[Ny Nu 2 3] fora2-by-3-by-1-by-1LTI
array of models with
Ny outputs and Nu inputs.
The function
ndims returns the total number of dimensions in an LTI array:
2, for single LTI models
2+
p, for LTI arrays, where p (greater than 2) is the number of array
dimensions
Note that
ndims (sys) = length(size(sys))
Toseehowtheseworkonthesample2-by-3LTIarraym2d of two-output,
one-input models, type
load LTIexamples
s = size(m2d)
s =
2 1 2 3
Notice that size returns a vector whose entries correspond to the length of
each of the four dimensions of
m2d: two outputs and one input in a 2-by-3 array
of models. Type
ndims(m2d)
ans =
4
to see that there are indeed four dimensions attributed to this LTI array.