# tf

Converts rffilter to transfer function

## Syntax

``[numerator,denominator] = tf(filter)``

## Description

example

````[numerator,denominator] = tf(filter)` returns numerators of S-parameters, Sij contained in num(i,j) and the denominator of the filter object. This method only works for the `'Transfer function'` implementation of `rffilter` object.```

## Examples

collapse all

Generate the transfer function of a low-pass fourth-order Butterworth filter for cut-off frequency of 1 rad/sec.

Create the rffilter object.

```filtobj = rffilter('FilterType',"Butterworth",'ResponseType','Lowpass', ... 'FilterOrder',4,'Implementation',"Transfer function", ... "PassbandFrequency",1/(2*pi),"Zin",50,"Zout",50);```

Use tf function to generate the transfer function.

`[numerator,denominator] = tf(filtobj);`

The numerator of the transfer function for S21 is:

`numerator{2,1}`
```ans = 1×5 0 0 0 0 1 ```

The denominator of the transfer function for S21 is:

`denominator`
```denominator = 1×5 1.0000 2.6131 3.4142 2.6131 1.0000 ```

The corresponding polynomials in factored form is:

`filtobj.DesignData.Numerator21`
```ans = 2×3 0 0 1 0 0 1 ```
`filtobj.DesignData.Denominator`
```ans = 2×3 1.0000 0.7654 1.0000 1.0000 1.8478 1.0000 ```

## Input Arguments

collapse all

RF filter, specified as an `rffilter` object.

## Output Arguments

collapse all

Numerators of S-parameters, returned as a cell array of Sij contained in num{i,j}.

Denominator of coefficients, returned as a row vector.

## Version History

Introduced in R2019b