Main Content

rfinterp1

Interpolate network parameter data at new frequencies

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.

Note

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

objnew = rfinterp1(___,'extrap') also interpolates the network data, but if any of the frequency values you specify in newfreq are above the final frequency of the network parameter object, objold.Frequencies(end), then the function extrapolates flat using the final value of the network parameter data objold.Parameters(:,:,end). If any of the frequency values you specify in newfreq are below the first frequency of the network parameter object, objold.Frequencies(1), then the function extrapolates linearly between conj(objold.Parameters(:,:,1)) and objold.Parameters(:,:,1). This ensures that the network parameter data of the new object, objnew.Parameters approach real values as in newfreq approach 0.

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 one of the following types of network parameter objects: S-parameters, t-parameters, Y-parameters, Z-parameters, h-parameters, g-parameters, or ABCD-parameters.

Interpolation frequencies, specified as a vector of positive numbers ordered from smallest to largest.

Output Arguments

collapse all

Interpolated data, 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.

Version History

Introduced in R2012b

See Also

|