size (Control Design and Simulation Module, MathScript Function)
Member of the info class.
Syntax
numIO = size(SysIn)
num = size(SysIn, sizetype)
Description
Returns the number of states, inputs, and/or outputs of a system model.
Inputs
Name | Description | ||||||
SysIn | Specifies a linear time-invariant (LTI) model in transfer function, zero-pole-gain, or state-space form. | ||||||
sizetype | Specifies the size type you want this function to return. If you do not specify a value, this function returns both the number of inputs and the number of outputs. sizetype takes the following integer or string values:
|
Outputs
Name | Description |
numIO | Returns the number of inputs and outputs of the SysIn model. numIO is an integer vector. This output is valid only if you do not specify a value for the sizetype input. |
num | Returns the number of states, inputs, or outputs, depending on the value you specify for the sizetype input. num is an integer scalar. This output is valid only if you specify a value for the sizetype input. |
Examples
SysIn = rss(4, 5, 6)
numIO = size(SysIn)
num = size(SysIn, 2)