tf

Constructs a transfer function model

Syntax

SYS = tf()

SYS = tf('s')

SYS = tf('z', Ts)

SYS = tf(S)

SYS = tf(SYSIN)

SYS = tf(NUM, DEN)

SYS = tf(NUM, DEN, Ts)

SYS = tf(NUM, DEN, Ts, 'variable', 'var')

Inputs

S
A scalar (static gain).
NUM
The numerator polynomial coefficients, stored as a row vector or as a cell array of row vectors.
DEN
The denominator polynomial coefficients, stored as a row vector or as a cell array of row vectors.
SYSIN
State-space or transfer function model.
Ts
Sampling time Ts (in seconds).
Ts = -1 leaves the sampling time unspecified.
Ts = 0 by default.
var
A string, either 'z^-1' or 'z' (default) to indicate the displayed polynomial variable.

Outputs

SYS
The transfer function model.

Examples

Transfer function model for a discrete time system:
num = [3 4];
den = [3 1 5];
Ts = 0.2;
sys = tf(num, den, Ts)
Transfer function for input 1, output 1

3 z + 4
-------------
3 z^2 + z + 5

Sampling Time: 0.2 s
Transfer function model for a discrete time system, but with z^-1 as the variable:
num = [3 4];
den = [3 1 5];
Ts = 0.2;
sys = tf(num, den, Ts, 'variable', 'z^-1')
Transfer function for input 1, output 1

3 z^-1 + 4 z^-2
-----------------
3 + z^-1 + 5 z^-2

Sampling Time: 0.2 s
State-space model as an input to the function tf:
sys = ss(1,2,3,4);
sys_tf = tf(sys)
Transfer function for input 1, output 1

4 s + 2
-------
s - 1