Main Content


Plot S-parameter data



rfplot(s_obj) plots the magnitude in dB versus frequency of all S-parameters (S11, S12 ... SNN) on the current axis. s_obj must be an s-parameter object.

rfplot(s_obj,i,j) plots the magnitude of Si, j, in decibels, versus frequency on the current axis.

rfplot(___,lineSpec) plots S-parameters using optional line types, symbols, and colors specified by linespec.

rfplot(___,plotflag) allows to specify the type of plot by using the plotflag.


hline = rfplot(___) plots the S-parameters and returns the column vector of handles to the line objects, hline.

[hline,haxes] = rfplot(filter,frequencies) plots the magnitude response of the S-parameters for the rf filter.


collapse all

Use sparameters to create a set S-parameters.

hs = sparameters('default.s2p');

Plot all S-parameters.


Plot S21.


Plot the angle of S21 in degrees.


Plot the real part of S21.


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.

Line specification, specified as a text input, that modifies the line types, symbols, and colors of the plot. The function takes text inputs in the same format as plot command. For more information on line specification values, see linespec.

Example: '-or'

Plot types, specified as the following values: 'db', 'real', 'imag', 'abs', 'angle'.

Example: 'angle'

RF filter, specified as an rffilter (RF Toolbox) object.

Frequencies to plot magnitude response, specified as a vector.

Output Arguments

collapse all

Line containing the S-parameter plot, returned as a line handle.

Axes of the rfplot, returned as an axes handle.

See Also

| (RF Toolbox)

Introduced before R2006a