# rationalfit

Approximate data using stable rational function object

## Syntax

## Description

fits a rational function object of the form`fit`

= rationalfit(`freq`

,`data`

)

$$\begin{array}{cc}F(s)={\displaystyle \sum _{k=1}^{n}\frac{{C}_{k}}{s-{A}_{k}}+D,}& s=j*2\pi f\end{array}$$

to the complex vector `data`

over the frequency values in the
positive vector `freq`

. The function returns a handle to the rational
function object, `h`

, with properties `A`

,
`C`

, `D`

, and `Delay`

.

**Note**

`rational`

is
recommend over `rationalfit`

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

fits a rational function object of the form `fit`

= rationalfit(___,`Name,Value`

)

$$F(s)=({\displaystyle \sum _{k=1}^{n}\frac{{{\displaystyle C}}_{k}}{s-{{\displaystyle A}}_{k}}}+D){{\displaystyle e}}^{-s.Delay},\text{\hspace{0.05em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}s=j*2\pi f$$

with additional options specified by one or more
`Name,Value`

pair arguments. These arguments offer finer control over
the performance and accuracy of the fitting algorithm.

## 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**