Main Content

rationalfit

Perform rationalfit on an S-parameters object

Description

[fit,errdb] = rationalfit(s,i,j) uses the rationalfit function to construct a fit, an rfmodel.rational object fitting only the (i,j)th element of the S-parameter object s. This syntax is equivalent to rationalfit(s.Frequencies,rfparam(s,i,j),...).

example

[fit,errdb] = rationalfit(s) uses the rationalfit function to construct a fit, an N-by-N of rfmodel.rational objects (sharing identical poles) fitting all the N-by-N elements of the S-parameter object s. You can directly pass this N-by-N fit to freqresp, ispassive, passivity functions. This syntax is equivalent to rationalfit(s.Frequencies,s.Parameters).

Examples

collapse all

Read a file named passive.s2p and fit the 2-by-2 S-parameters.

S = sparameters('passive.s2p');
[fit,errdb] = rationalfit(S)
fit = 
  2x2 rfmodel.rational array with properties:

    A
    C
    D
    Delay
    Name
errdb = -40.4702

Input Arguments

collapse all

S-parameters, specified as an RF Toolbox™ network parameter object. To create this type of object, use the sparameters function.

Row index of data to plot, specified as a positive integer.

Column index of data to plot, specified as a positive integer.

Output Arguments

collapse all

One or more rational function objects, returned as an N-by-N rfmodel.rational object. The number of dimensions in data determines the dimensionality of h.

Relative error achieved, returned as a double, in dB.

Version History

Introduced before R2006a