#### 30.2.4 Zero-pole system interface functions

— Function File: zp (zer, pol, k, tsam, inname, outname)

> Create system data structure from zero-pole data.

> Inputs

> zer
>   vector of system zeros
> pol
>   vector of system poles
> k
>   scalar leading coefficient
> tsam
>   sampling period. default: 0 (continuous system)
> inname
> outname
>   input/output signal names (lists of strings)

> Outputs sys: system data structure

> Example

>               octave:1> sys=zp([1 -1],[-2 -2 0],1);
>               octave:2> sysout(sys)
>               Input(s)
>                       1: u_1
>               Output(s):
>                       1: y_1
>               zero-pole form:
>               1 (s - 1) (s + 1)
>               -----------------
>               s (s + 2) (s + 2)

— Function File: zp2sys (zer, pol, k, tsam, inname, outname)

> Create system data structure from zero-pole data.

> Inputs

> zer
>   Vector of system zeros.
> pol
>   Vector of system poles.
> k
>   Scalar leading coefficient.
> tsam
>   Sampling period; default: 0 (continuous system).
> inname
> outname
>   Input/output signal names (lists of strings).

> Output

> sys
>   System data structure.

> Example

>               octave:1> sys=zp2sys([1 -1],[-2 -2 0],1);
>               octave:2> sysout(sys)
>               Input(s)
>                       1: u_1
>               Output(s):
>                       1: y_1
>               zero-pole form:
>               1 (s - 1) (s + 1)
>               -----------------
>               s (s + 2) (s + 2)

— Function File: [zer, pol, k, tsam, inname, outname] = sys2zp (sys)

> Extract zero/pole/leading coefficient information from a system data structure.

> See `zp` for parameter descriptions.

> Example

>               octave:1> sys=ss([1 -2; -1.1,-2.1],[0;1],[1 1]);
>               octave:2> [zer,pol,k] = sys2zp(sys)
>               zer = 3.0000
>               pol =
>                 -2.6953
>                  1.5953
>               k = 1