#### 30.2.3 Transfer function system interface functions

— Function File: tf (num, den, tsam, inname, outname)

> build system data structure from transfer function format data

> Inputs

> num
> den
>   coefficients of numerator/denominator polynomials
> tsam
>   sampling interval. default: 0 (continuous time)
> inname
> outname
>   input/output signal names; may be a string or cell array with a single string entry.

> Outputs sys = system data structure

> Example

>               octave:1> sys=tf([2 1],[1 2 1],0.1);
>               octave:2> sysout(sys)
>               Input(s)
>                       1: u_1
>               Output(s):
>                       1: y_1 (discrete)
>               Sampling interval: 0.1
>               transfer function form:
>               2*z^1 + 1
>               -----------------
>               1*z^2 + 2*z^1 + 1

— Function File: tf2sys (num, den, tsam, inname, outname)

> Build system data structure from transfer function format data.

> Inputs

> num
> den
>   Coefficients of numerator/denominator polynomials.
> tsam
>   Sampling interval; default: 0 (continuous time).
> inname
> outname
>   Input/output signal names; may be a string or cell array with a single string entry.

> Output

> sys
>   System data structure.

> Example

>               octave:1> sys=tf2sys([2 1],[1 2 1],0.1);
>               octave:2> sysout(sys)
>               Input(s)
>                       1: u_1
>               Output(s):
>                       1: y_1 (discrete)
>               Sampling interval: 0.1
>               transfer function form:
>               2*z^1 + 1
>               -----------------
>               1*z^2 + 2*z^1 + 1

— Function File: [num, den, tsam, inname, outname] = sys2tf (sys)

> Extract transfer function data from a system data structure.

> See `tf` for parameter descriptions.

> Example

>               octave:1> sys=ss([1 -2; -1.1,-2.1],[0;1],[1 1]);
>               octave:2> [num,den] = sys2tf(sys)
>               num = 1.0000  -3.0000
>               den = 1.0000   1.1000  -4.3000