rfplot - Plot S-parameter data (2024)

Plot S-parameter data

collapse all in page

Syntax

rfplot(s_obj)

rfplot(s_obj,i,j)

rfplot(s_obj,[i1:in],[j1:jn])

rfplot(s_obj,{[i1 j1];...;[in jn]})

rfplot(___,LineSpec)

rfplot(___,plotflag)

rfplot(s_obj,'diag')

rfplot(s_obj,part)

rfplot(s_obj,part,k)

rfplot(ax,___)

hline = rfplot(___)

[hline,haxes] = rfplot(filter,frequencies)

Description

rfplot(s_obj) plots the magnitude in decibels versus frequency of all S-parameters (S11, S12 ... SNN) on the current axes.

example

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

rfplot(s_obj,[i1:in],[j1:jn]) plots the magnitude of multiple S-parameters in decibels on the current axis.

example

rfplot(s_obj,{[i1 j1];...;[in jn]}) plots the magnitude of specific S-parameters in decibels on the current axis.

example

rfplot(___,LineSpec) plots S-parameters using the line parameters specified in LineSpec.

rfplot(___,plotflag)plots S-parameters according to the type specified in plotflag.

rfplot(s_obj,'diag') plots the magnitude of Si i reflection coefficients or the diagonal elements of the S-parameter matrix 'diag' on the current axis.

example

rfplot(s_obj,part) plots the upper or lower triangular portion of the S-parameters matrix on the current axis.

rfplot(s_obj,part,k) plots the elements on, above, or below the kth diagonal of the S-parameters matrix. For more information, see the tril and triu functions.

example

rfplot(ax,___) plots the S-parameters on the axes specified in ax instead of the current axes. Specify ax as the first input argument followed by any of the input argument combinations in the previous syntaxes. Return the current axes using the gca function.

hline = rfplot(___) plots the S-parameters and returns a column vector of line handles in hline.

example

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

Examples

collapse all

Plot S-Parameter Data

Use the sparameters function to create a set S-parameters.

hs = sparameters('default.s2p');

Plot all the S-parameters.

rfplot(hs)

rfplot - Plot S-parameter data (1)

Plot S21.

rfplot(hs,2,1)

rfplot - Plot S-parameter data (2)

Plot the angle of S21 in degrees.

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

rfplot - Plot S-parameter data (3)

Plot the real part of S21.

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

rfplot - Plot S-parameter data (4)

Plot S-Parameters in Specified Range

Open Live Script

Create an S-parameter object from a three-port Touchstone file.

sobj = sparameters('default.s3p');

Plot S12, S13, S22, S23, S32, and S33.

rfplot(sobj,[1:3],[2:3],'abs')

rfplot - Plot S-parameter data (5)

Plot Specific S-Parameters

Open Live Script

Create an S-parameter object from a three-port Touchstone file.

sobj = sparameters('default.s3p');

Plot S12, S33, S11, and S22.

rfplot(sobj,{[1 2]; [3 3]; [1 1]; [2 2]},'abs') 

rfplot - Plot S-parameter data (6)

Plot Reflection and Transmission Coefficients

Open Live Script

Create an S-parameter object from a three-port Touchstone file.

sobj = sparameters('default.s3p');

Plot the reflection coefficients of the S-parameters.

rfplot(sobj,'diag','abs')

rfplot - Plot S-parameter data (7)

Plot the transmission coefficients of the S-parameters.

rfplot(sobj,'triu',1,'abs')hold onrfplot(sobj,'tril',-1,'abs')

rfplot - Plot S-parameter data (8)

Input Arguments

collapse all

s_objS-parameters
network parameter object

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

iRow index
scalar | vector | cell array

Row index of the data to plot, specified as a scalar, vector, or cell array.

Type of PlotHow to Specify Indices
Single parameter

Specify i and j as scalars.

rfplot(s_obj,[1,2])

Set of parameters

Specify i and j as vectors.

rfplot(s_obj,[1:3],[2:3])

rfplot(s_obj,[1,2],[2,3])

Specific parameters

Specify a cell array of i and j scalars.

rfplot(s_obj, {[1 2];[2 3]})

jColumn index
scalar | vector | cell array

Column index of the data to plot, specified as a scalar, vector, or cell array.

Type of PlotHow to Specify Indices
Single parameter

Specify i and j as scalars.

rfplot(s_obj,[1,2])

Set of parameters

Specify i and j as vectors.

rfplot(s_obj,[1:3],[2:3])

rfplot(s_obj,[1,2],[2,3])

Specific parameters

Specify a cell array of i and j scalars.

rfplot(s_obj, {[1 2];[2 3]})

LineSpecLine style, marker, and color
character vector | string

Line style, marker, and color, specified as a character vector or a string containing symbols. The symbols can appear in any order. You do not need to specify all three characteristics (line style, marker, and color). For example, if you omit the line style and specify the marker, then the plot shows only the marker and no line.

Example: '--or'creates a dashed line in red with circular markers

Line StyleDescriptionResulting Line
'-'Solid line

rfplot - Plot S-parameter data (9)

'--'Dashed line

rfplot - Plot S-parameter data (10)

':'Dotted line

rfplot - Plot S-parameter data (11)

'-.'Dash-dotted line

rfplot - Plot S-parameter data (12)

MarkerDescriptionResulting Marker
'o'Circle

rfplot - Plot S-parameter data (13)

'+'Plus sign

rfplot - Plot S-parameter data (14)

'*'Asterisk

rfplot - Plot S-parameter data (15)

'.'Point

rfplot - Plot S-parameter data (16)

'x'Cross

rfplot - Plot S-parameter data (17)

'_'Horizontal line

rfplot - Plot S-parameter data (18)

'|'Vertical line

rfplot - Plot S-parameter data (19)

's'Square

rfplot - Plot S-parameter data (20)

'd'Diamond

rfplot - Plot S-parameter data (21)

'^'Upward-pointing triangle

rfplot - Plot S-parameter data (22)

'v'Downward-pointing triangle

rfplot - Plot S-parameter data (23)

'>'Right-pointing triangle

rfplot - Plot S-parameter data (24)

'<'Left-pointing triangle

rfplot - Plot S-parameter data (25)

'p'Pentagram

rfplot - Plot S-parameter data (26)

'h'Hexagram

rfplot - Plot S-parameter data (27)

Color NameShort NameRGB TripletAppearance
'red''r'[1 0 0]

rfplot - Plot S-parameter data (28)

'green''g'[0 1 0]

rfplot - Plot S-parameter data (29)

'blue''b'[0 0 1]

rfplot - Plot S-parameter data (30)

'cyan' 'c'[0 1 1]

rfplot - Plot S-parameter data (31)

'magenta''m'[1 0 1]

rfplot - Plot S-parameter data (32)

'yellow''y'[1 1 0]

rfplot - Plot S-parameter data (33)

'black''k'[0 0 0]

rfplot - Plot S-parameter data (34)

'white''w'[1 1 1]

rfplot - Plot S-parameter data (35)

plotflagPlot types
'db' (default) | 'real' | 'imag' | 'abs' | 'angle'

Plot types, specified as either 'db', 'real', 'imag', 'abs', or 'angle'.

Example: 'angle'

filterRF filter
rffilter object | lcladder object

RF filter, specified as an rffilter object or an lcladder object.

frequenciesFrequencies to plot magnitude response
vector

Frequencies to plot magnitude response, specified as a vector.

partPortion of S-parameters matrix
'triu' | 'tril'

Portion of the S-parameters matrix, specified as 'triu' or 'tril'. Specify triu to plot the Upper Triangular portion of the matrix and tril to plot the Lower Triangular portion.

kDiagonals to include
0 (default) | scalar

Diagonals to include, specified as a scalar.

  • k = 0 specifies the main diagonal.

  • k > 0 specifies a diagonal above the main diagonal.

  • k < 0 specifies a diagonal below the main diagonal.

rfplot - Plot S-parameter data (36)

axAxes object
axes object | uiaxes object

Axes object, specified as an axes or a uiaxes object.

Output Arguments

collapse all

hline — Line
line handle

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

haxes — Axes
axes handle

Axes of the rfplot, returned as an axes handle.

More About

collapse all

Upper Triangular

The upper triangular portion of a matrix includes the main diagonal and all elements above it. The shaded elements in this graphic depict the upper triangular portion of a 6-by-6 matrix.

rfplot - Plot S-parameter data (37)

Lower Triangular

The lower triangular portion of a matrix includes the main diagonal and all elements below it. The shaded elements in this graphic depict the lower triangular portion of a 6-by-6 matrix.

rfplot - Plot S-parameter data (38)

Version History

Introduced before R2006a

expand all

Use the 'diag', part, and k input arguments in the rfplot function to plot S-parameter data with multiple indices.

See Also

smith | rfparam | rfinterp1 | sparameters (Antenna Toolbox) | sparameters | setrfplot

MATLAB Command

You clicked a link that corresponds to this MATLAB command:

 

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

rfplot - Plot S-parameter data (39)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
  • 日本 (日本語)
  • 한국 (한국어)

Contact your local office

rfplot - Plot S-parameter data (2024)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Lilliana Bartoletti

Last Updated:

Views: 5251

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Lilliana Bartoletti

Birthday: 1999-11-18

Address: 58866 Tricia Spurs, North Melvinberg, HI 91346-3774

Phone: +50616620367928

Job: Real-Estate Liaison

Hobby: Graffiti, Astronomy, Handball, Magic, Origami, Fashion, Foreign language learning

Introduction: My name is Lilliana Bartoletti, I am a adventurous, pleasant, shiny, beautiful, handsome, zealous, tasty person who loves writing and wants to share my knowledge and understanding with you.