Function Reference | ![]() ![]() |
Provide the output/input/array dimensions of LTI models, the model order of TF, SS, and ZPK models, and the number of frequencies of FRD models
Syntax
size(sys) d = size(sys) Ny = size(sys,1) Nu = size(sys,2) Sk = size(sys,2+k) Ns = size(sys,'order') Nf = size(sys,'frequency')
Description
When invoked without output arguments, size
returns a vector of the number of outputs and inputs for a single LTI model. The lengths of the array dimensions are also included in the response to size when (sys)
sys
is an LTI array. size
is the overloaded version of the MATLAB function size
for LTI objects.
d = [Ny Nu]
for a single LTI model sys
with Ny
outputs and Nu
inputs
d = [Ny Nu S1 S2 ... Sp]
for an S1
-by-S2
-by-...-by-Sp
array of LTI models with Ny
outputs and Nu
inputs
Ny = size(sys,1) returns the number of outputs of sys
.
Nu = size(sys,2) returns the number of inputs of sys
.
Sk = size(sys,2+k)
returns the length of the k
-th array dimension when sys
is an LTI array.
Ns = size(sys,'order') returns the model order of a TF, SS, or ZPK model. This is the same as the number of states for state-space models. When sys
is an LTI array, ns is the maximum order of all of the models in the LTI array.
Nf = size(sys,'frequency') returns the number of frequencies when sys
is an FRD. This is the same as the length of sys.frequency
.
Example
Consider the random LTI array of state-space models
Its dimensions are obtained by typing
See Also
isempty
Test if LTI model is empty
issiso
Test if LTI model is SISO
ndims
Number of dimensions of an LTI array
![]() | sisotool | sminreal | ![]() |