Documentation

rfplot

Plot S-parameter data

Syntax

  • rfplot(s_obj) example
  • rfplot(s_obj,i,j)
  • rfplot(___,lineSpec)
  • rfplot(___,plotflag)
  • hline = rfplot(___) example

Description

example

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.

example

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

Examples

collapse all

Plot S-Parameter Data Using rfplot

Create S-parameter

hs = sparameters('default.s2p');

Plot all S-paramteres

figure;
rfplot(hs)

Plot S21

figure;
rfplot(hs,2,1)

Plot the angle of S21 in degrees

rfplot(hs,2,1,'angle')

Plot the real part of S21

rfplot(hs,2,1,'real')

Input Arguments

collapse all

s_obj — 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 plot command. For more information on line specification strings, see linespec.

Example: '-or'

plotflag — Plot types'db' (default) | character string

Plot types, specified as a character string. The valid plot flags are 'db', 'real', 'imag', 'abs', ‘angle'.

Example: 'angle'

Output Arguments

collapse all

hline — Lineline handle

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

See Also

| |

Was this topic helpful?