Main Content

Discrete-Time Numeric Models

Create Discrete-Time Transfer Function Model

This example shows how to create a discrete-time transfer function model using tf.

Create the transfer function G(z)=zz22z6 with a sample time of 0.1 s.

num = [1 0];
den = [1 -2 -6];
Ts = 0.1;
G = tf(num,den,Ts)

num and den are the numerator and denominator polynomial coefficients in descending powers of z. G is a tf model object.

The sample time is stored in the Ts property of G. Access the sample time Ts, using dot notation:

G.Ts

Other Model Types in Discrete Time Representations

Create discrete-time zpk, ss, and frd models in a similar way to discrete-time transfer functions, by appending a sample time to the input arguments. For examples, see the reference pages for those commands.

See Also

| | |

Related Topics