Creating and Manipulating Models | ![]() ![]() |
Data Retrieval
The functions tf
, zpk
, ss
, and frd
pack the model data and sample time in a single LTI object. Conversely, the following commands provide convenient data retrieval for any type of TF, SS, or ZPK model sys
, or FRD model sysfr
.
[num,den,Ts] = tfdata(sys) % Ts = sample time [z,p,k,Ts] = zpkdata(sys) [a,b,c,d,Ts] = ssdata(sys) [a,b,c,d,e,Ts] = dssdata(sys) [response,frequency,Ts] = frdata(sysfr)
sys
can be any type of LTI object, except an FRD model
sysfr
, the input argument to frdata
, can only be an FRD model
You can use any variable names you want in the output argument list of any of these functions. The ones listed here correspond to the model property names described in Tables 2-2 - 2.5.
The output arguments num
and den
assigned to tfdata
, and z
and p
assigned to zpkdata
, are cell arrays, even in the SISO case. These cell arrays have as many rows as outputs, as many columns as inputs, and their ijth entry specifies the transfer function from the jth input to the ith output. For example,
creates the one-output/two-input transfer function
displays the coefficients of the numerator and denominator of the first input channel.
Note that the same result is obtained using
See Direct Property Referencing for more information about this syntax.
To obtain the numerator and denominator of SISO systems directly as row vectors, use the syntax
returns the zeros, z
, and the poles, p
, as vectors for SISO systems.
![]() | Discrete-Time Models | LTI Properties | ![]() |