Creating and Manipulating Models Previous page   Next Page

Accessing the Dimensions of an LTI Array
Using size and ndims

You can access the dimensions and shape of an LTI array using

When applied to an LTI array, size returns

where

Note the following when using the size function:

The function ndims returns the total number of dimensions in an LTI array:

Note that

To see how these work on the sample 2-by-3 LTI array m2d of two-output, one-input models, type

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

to see that there are indeed four dimensions attributed to this LTI array.


Previous page  I/O and Array Dimensions of LTI Arrays Using reshape to Rearrange an LTI Array Next page

© 1994-2005 The MathWorks, Inc.