Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

rfinterp1

Interpolate network parameter data at new frequencies

Syntax

objnew = rfinterp1(objold,newfreq)
objnew = rfinterp1(objold,newfreq,'extrap')

Description

example

objnew = rfinterp1(objold,newfreq) interpolates the network parameter data in objold at the specified frequencies, newfreq, storing the results in objnew. rfinterp1 uses the MATLAB® function interp1 to interpolate each individual (i,j) parameter of objold to the new frequencies.

If any value of the specified frequency is outside of the range specified by objold.frequencies, then rfinterp1 inserts NaNs into objnew for those frequency values.

objnew = rfinterp1(objold,newfreq,'extrap') interpolates as above, but if any value of the specified frequency values are outside of the range of objold.frequencies, then rfinterp1 will extrapolate flat using the nearest values in the frequency range.

Examples

collapse all

Read the data from the file default.s2p into an S-parameter object.

hnet = sparameters('default.s2p');

Interpolate the data at a specified set of frequencies.

freq = [1.2:0.2:2.8]*1e9;
hnet2 = rfinterp1(hnet,freq)
hnet2 = 

  sparameters: S-parameters object

       NumPorts: 2
    Frequencies: [9x1 double]
     Parameters: [2x2x9 double]
      Impedance: 50

  rfparam(obj,i,j) returns S-parameter Sij

Input Arguments

collapse all

Data to interpolate, specified as an RF Toolbox™ network parameter object. objold must be a network parameter object of the following types: s-parameters, t-parameters, y-parameters, z-parameters, h-parameters, g-parameters, or abcd-parameters.

Frequencies of interpolation, specified as a vector of positive numbers ordered from smallest to largest.

Output Arguments

collapse all

Result of interpolation, returned as an RF Toolbox network parameter object of the same type as objnew.

Algorithms

The function uses the MATLAB function interp1 to perform the interpolation operation. Overall performance is similar to the RF Toolbox analyze function. However, behaviors of the two functions differ when freq contains frequencies outside the range of the original data:

  • analyze performs a zeroth-order extrapolation for out-of-range data points.

  • rfinterp1 inserts NaN values for out-of-range data points.

See Also

|

Introduced in R2012b

Was this topic helpful?