Plot S-parameter data


  • rfplot(hs,i,j)
  • rfplot(hs)
  • rfplot(___,LineSpec)
  • hline = rfplot(___)


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

rfplot(hs) plots all S-parameter vectors in hs (S11, S12 ... SNN) on the current axis.

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

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


expand all

Plot S-parameter data

Create an S-parameter object from data in the file default.s2p.

hs = sparameters('default.s2p');

Plot all S-parameters. The data describes a 2-port network, and thus S11, S12, S21, and S22 appear on the plot.


To plot S21 only, provide additional inputs to rfplot.


Input Arguments

expand all

hs — S-parametersnetwork parameter object

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

i — Row indexpositive integer

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

j — Column indexpositive integer

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

LineSpec — Line specificationcharacter string

Line specification , specified as a character string, that modifies the line types, symbols, and colors of the plot. The function takes string specifiers in the same format as those accepted by the plot command. For more information on line specification strings, see linespec.

Example: '-or'

Output Arguments

expand all

hline — Lineline handle

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

See Also

Was this topic helpful?