# zero

Zeros and gain of SISO dynamic system

## Syntax

``Z = zero(sys)``
``````[Z,gain] = zero(sys)``````
``````[Z,gain] = zero(sys,J1,...,JN)``````

## Description

example

````Z = zero(sys)` returns the zeros of the single-input, single-output (SISO) dynamic system model, `sys`. The output is expressed as the reciprocal of the time units specified in `sys.TimeUnit`.```

example

``````[Z,gain] = zero(sys)``` also returns the zero-pole-gain of `sys`.```

example

``````[Z,gain] = zero(sys,J1,...,JN)``` returns the zeros and gain of the entries in the model array `sys` with subscripts `J1,...,JN`.```

## Examples

collapse all

Compute the zeros of the following transfer function:

`$sys\left(s\right)=\frac{4.2{s}^{2}+0.25s-0.004}{{s}^{2}+9.6s+17}$`

```sys = tf([4.2,0.25,-0.004],[1,9.6,17]); Z = zero(sys)```
```Z = 2×1 -0.0726 0.0131 ```

Calculate the zero locations and zero-pole gain of the following transfer function:

`$sys\left(s\right)=\frac{4.2{s}^{2}+0.25s-0.004}{{s}^{2}+9.6s+17}$`

```sys = tf([4.2,0.25,-0.004],[1,9.6,17]); [z,gain] = zero(sys)```
```z = 2×1 -0.0726 0.0131 ```
```gain = 4.2000 ```

The zero locations are expressed in ${\mathrm{second}}^{-1},$ because the time unit of the transfer function (`H.TimeUnit`) is seconds.

For this example, load a 3-by-1 array of transfer function models.

```load('tfArray.mat','sys'); size(sys)```
```3x1 array of transfer functions. Each model has 1 outputs and 1 inputs. ```

Find the zeros and gain values of the models in the array.

```[Z, gain] = zero(sys); Z(:,:,1,1)```
```ans = 0x1 empty double column vector ```
`gain(:,:,1,1)`
```ans = 1 ```

`zero` returns an array each for the zeros and the gain values respectively. Here, `Z(:,:,1,1)` and `gain(:,:,1,1)` corresponds to the zero and the gain value of the first model in the array, that is, `sys(:,:,1,1)`.

## Input Arguments

collapse all

Dynamic system, specified as a SISO dynamic system model, or an array of SISO dynamic system models. Dynamic systems that you can use include continuous-time or discrete-time numeric LTI models such as `tf`, `zpk`, or `ss` models.

If `sys` is a generalized state-space model `genss` or an uncertain state-space model `uss`, `zero` returns the zeros of the current or nominal value of `sys`. If `sys` is an array of models, `zero` returns the zeros of the model corresponding to its subscript `J1,...,JN` in `sys`. For more information on model arrays, see Model Arrays.

Indices of models in array whose zeros you want to extract, specified as a positive integer. You can provide as many indices as there are array dimensions in `sys`. For example, if `sys` is a 4-by-5 array of dynamic system models, the following command extracts the zeros for entry (2,3) in the array.

`Z = zero(sys,2,3);`

## Output Arguments

collapse all

Zeros of the dynamic system, returned as a column vector or an array. If `sys` is:

• A single model, then `Z` is a column vector of zeros of the dynamic system model `sys`

• A model array, then `Z` is an array containing the zeros of each model in `sys`

`Z` is expressed as the reciprocal of the time units specified in `sys.TimeUnit`. For example, zero is expressed in 1/minute if `sys.TimeUnit` = `'minutes'`.

Zero-pole-gain of the dynamic system, returned as a scalar. In other words, `gain` is the value of `K` when the model is written in `zpk` form.

## Tips

• If `sys` has internal delays, `zero` sets all internal delays to zero, creating a zero-order Padé approximation. This approximation ensures that the system has a finite number of zeros. `zero` returns an error if setting internal delays to zero creates singular algebraic loops. To assess the stability of models with internal delays, use `step` or `impulse`.

• To calculate the transmission zeros of a multi-input, multi-output (MIMO) system, use `tzero`.