# rationalfit

Approximate data using stable rational function object

## Syntax

## Description

The `rationalfit`

function uses vector fitting with complex
frequencies to perform rational fitting on a complex frequency-dependent data. The
`rationalfit`

returns an `rfmodel.rational`

object. The fit of the each element of the `rationalfit`

function is given
by this equation:

$$\begin{array}{l}F(s)=\left(\frac{C(1)}{S-A(1)}+\frac{C(2)}{S-A(2)}+\mathrm{...}+\frac{C(n)}{S-A(n)}+D\right)\ast {e}^{(-S\ast delay\ast delayfactor)}\\ \text{Where}\\ \text{A}\text{Polesoftherationalfitfunction}\\ \text{C}\text{Residuesoftherationalfitfunction}\\ \text{D}\text{Frequencyresponseoffset}\\ \text{Delay}\text{Frequencyresponsetimedelay}\\ \text{S}\text{Complexfrequencies(j}\ast \text{2}\pi \ast freq\ast data)\end{array}$$

**Note**

`rational`

is recommend
over `rationalfit`

because it enables faster simulation and improved
fitting of complex frequency-dependent data.* (since R2023b)*

creates a non-reflective
one-port `fit`

= rationalfit`rationalfit`

object with default properties.

specifies options to control aspects of fit. For example, `fit`

= rationalfit(___,`Name=Value`

)```
fit =
rationalfit(s,PoleSharing='Column')
```

shares the poles by S-parameter column
terms for the fit. Specify name-value arguments after any of the input arguments from the
previous syntaxes.

## Examples

## Input Arguments

## Output Arguments

## Tips

To see how well the object fits the original data, use the `freqresp`

function to compute the frequency response of the object. Then, plot the original data and the
frequency response of the rational function object. For more information, see the `freqresp`

reference
page or the above examples.

## References

[1] Gustavsen.B and A.Semlyen,
“Rational approximation of frequency domain responses by vector fitting,”
*IEEE Trans. Power Delivery*, Vol. 14, No. 3, pp. 1052–1061, July
1999.

[2] Zeng.R and J. Sinsky,
“Modified Rational Function Modeling Technique for High Speed Circuits,”
*IEEE MTT-S Int. Microwave Symp. Dig.*, San Francisco, CA, June 11–16,
2006.

## Version History

**Introduced in R2006b**