Control System Toolbox Function Reference 
Set or modify LTI model properties
Syntax
set(sys,'Property
',Value) set(sys,'Property1
',Value1,'Property2
',Value2,...) set(sys,'Property
') set(sys)
Description
set
is used to set or modify the properties of an LTI model (see LTI Properties for background on LTI properties). Like its Handle Graphics counterpart, set
uses property name/property value pairs to update property values.
set(sys,'
assigns the value Property
',Value)
Value
to the property of the LTI model sys
specified by the string '
Property
'
. This string can be the full property name (for example, 'UserData'
) or any unambiguous caseinsensitive abbreviation (for example, 'user'
). The specified property must be compatible with the model type. For example, if sys
is a transfer function, Variable
is a valid property but StateName
is not (see ModelSpecific Properties for details).
sets multiple property values with a single statement. Each property name/property value pair updates one particular property.set(sys,'
Property1
',Value1,'
Property2
',Value2,...)
displays admissible values for the property specified by set(sys,'
Property
')
'
Property
'
. See Property Values below for an overview of legitimate LTI property values.
set(sys)
displays all assignable properties of sys
and their admissible values.
Example
Consider the SISO statespace model created by
sys = ss(1,2,3,4);
You can add an input delay of 0.1 second, label the input as torque
, reset the matrix to zero, and store its DC gain in the 'Userdata'
property by
set(sys,'inputd',0.1,'inputn','torque','d',0,'user',dcgain(sys))
Note that set
does not require any output argument. Check the result with get
by typing
get(sys) a = 1 b = 2 c = 3 d = 0 e = [] Nx = 1 StateName = {''} Ts = 0 InputDelay = 0.1 OutputDelay = 0 ioDelay = 0 InputName = {'torque'} OutputName = {''} InputGroup = {0x2 cell} OutputGroup = {0x2 cell} Notes = {} UserData = 6
Property Values
The following table lists the admissible values for each LTI property. and denotes the number of inputs and outputs of the underlying LTI model. For Kdimensional LTI arrays, let denote the array dimensions.
Property Name 
Admissible Property Values 

Note: Resetting the sample time property does not alter the model data. Use 
ioDelay 
Input/Output delays specified with


Input delays specified with

OutputDelay 
Output delays specified with


String, array of strings, or cell array of strings 

Arbitrary MATLAB variable 

['rudder ' ; 'aileron'] 

Same as InputName (with "input" replaced by "output") 
InputGroup 
Cell array. See Input Groups and Output Groups. 
OutputGroup 
Same as InputGroup 
Property Name 
Admissible Property Values 

Same as InputName (with Input replaced by State ) 

Realvalued statespace matrices (multidimensional arrays, in the case of LTI arrays) with compatible dimensions for the number of states, inputs, and outputs. See The Size of LTI Array Data for SS Models. 
Nx 
Remark
For discretetime transfer functions, the convention used to represent the numerator and denominator depends on the choice of variable (see the tf
entry for details). Like tf
, the syntax for set
changes to remain consistent with the choice of variable. For example, if the Variable
property is set to 'z'
(the default),
set(h,'num',[1 2],'den',[1 3 4])
produces the transfer function
However, if you change the Variable
to 'z^1'
(or 'q'
) by
set(h,'Variable','z^1'),
set(h,'num',[1 2],'den',[1 3 4])
now interprets the row vectors [1 2]
and [1 3 4]
as the polynomials and and produces:
Note Because the resulting transfer functions are different, make sure to use the convention consistent with your choice of variable. 
See Also
get
Access/query LTI model properties
frd
Specify a frequency response data model
ss
Specify a statespace model
tf
Specify a transfer function
zpk
Specify a zeropolegain model
series  sgrid 