Main Content

semilogx

Plot RF circuit object parameters using log scale for x-axis

Description

example

semilogx(h,circuitPara) plots the circuit parameter circuitPara from the RFCKT or RF data object h using a logarithmic scale for the x-axis. You can specify multiple circuit parameters in this syntax.

Note

For all circuit objects except those that contain data from a data file, you must perform a frequency domain analysis with the analyze method before calling semilogx.

semilogx(h,circuitPara,dataFormat) plots the data of the RFCKT or RF data object using a logarithmic scale for the x-axis with the specified data format.

example

semilogx(___,xAxisPara,xAxisFmt) plots the circuit parameters circuitPara using a logarithmic scale for the x-axis along with the variables xAxisPara and their corresponding format xAxisFmt. Specify xAxisPara and xAxisFmt arguments after any of the input argument combinations in the previous syntaxes.

semilogx(___,opCon,opVal) plots the circuit parameters using a logarithmic scale for the x-axis with operating conditions opCon and operating values opVal for the circuit object h.

Derive operating conditions for the RFCKT or RF data object h using the getop(h) command

example

semilogx(___,Name,Value) plots the data of a RFCKT or RF data object with name-value arguments. Specify name-value argument after any of the input argument combinations in the previous syntaxes.

example

lineseries = semilogx(___) returns the line series property object lineseries. This output is the same as the output returned by the MATLAB® semilogx function.

Examples

collapse all

Create an amplifier object from default.s2p file.

h = read(rfckt.amplifier,'default.s2p');

Plot S11 and S21 using log scale on x-axis.

lineseries = semilogx(h,'S11','S21')
lineseries = 
  2x1 Line array:

  Line    (S_{11})
  Line    (S_{21})

Change the color of the S11 data.

lineseries(1).Color = [0.4 0 1];

Figure contains an axes. The axes contains 2 objects of type line. These objects represent S_{11}, S_{21}.

Create an RFCKT amplifier object from the specified P2D file type.

h = read(rfckt.amplifier,'default.p2d');

Plot the output power of the amplifier.

semilogx(h,'Pout')

Figure contains an axes. The axes contains 3 objects of type line. These objects represent P_{out}(Freq=1[GHz];Bias=1.5), P_{out}(Freq=2.1[GHz];Bias=1.5), P_{out}(Freq=2.9[GHz];Bias=1.5).

Plot the output power of the amplifier and set the format for Pin in milliwatts.

semilogx(h,'Pout','Pin','mW')

Figure contains an axes. The axes contains 3 objects of type line. These objects represent P_{out}(Freq=1[GHz];Bias=1.5), P_{out}(Freq=2.1[GHz];Bias=1.5), P_{out}(Freq=2.9[GHz];Bias=1.5).

Plot the output power of the amplifier at 2.4 GHz.

semilogx(h,'Pout','Pin','mW','bias',1.5,'Freq',2.4e9)

Figure contains an axes. The axes contains an object of type line. This object represents P_{out}(Freq=2.4[GHz];Bias=1.5).

Input Arguments

collapse all

RFCKT or RF data object, specified as a rfckt or rfdata object.

For complete list of RFCKT and RF data objects, see RF Circuit Objects and RF Data Objects.

Format of the data to be plotted, specified as character vector or string scalar. Type listformat(h,circuitPara) command to see the available formats for a specified parameter.

Example: lineseries = semilogy(h,'Pout','dBm')

Valid RFCKT or data object parameter, specified as a character vector or string scalar.

Use listparam(h) for a list of valid parameters for the circuit or data object h.

X-axis variable to plot with the circuit parameters, circuitPara, specified as a character vector or string scalar.

This table shows the commonly used circuitPara and their corresponding xAxisPara values. The function uses the default values listed in the table if you do not specify xAxisPara .

circuitPara ValuexAxisPara Value
Pout, Phase, LS11, LS12, LS21, LS22Pin (default), Freq
S11, S12, S21, S22, NF, IIP3, OIP3, GroupDelay, VSWRIn, VSWROut, GammaIn, GammaOut, FMIN, GammaOPT, RN, TF1, TF2, Gt, Ga, Gp, Gmag, Gmsg, GammaMS, GammaML, K, Delta, Mu, MuPrimeFreq
AM/AM, AM/PMAM

xAxisPara format, specified as a character vector or string scalar. You do not need to specify xAxisFmt when xAxisPara is an operating condition.

This table shows the commonly used xAxisPara and their corresponding xAxisFmt. The function uses the default values listed in the table if you do not specify xAxisFmt .

xAxisPara ValuexAxisFmt Value
PindBm (default), mW, W, dBW
Freq

THz, GHz, MHz, KHz, Hz

By default, xAxisFmt is chosen to provide the best scaling for the given xAxisPara values.

AMMagnitude (decibels) (default), Magnitude (linear)

Example: semilogx(h,'Pout','Pin','mW') plots data using a logarithmic scale for the x-axis for circuit object, h, with xAxisPara set to 'Pin' and xAxisFmt set to 'mW'.

Operating conditions derived from a P2D or S2D file, specified as a string scalar or a character vector.

For some circuit parameters, you can specify a set of frequency or input power values at which the function plots the specified parameter.

For example:

  • When plotting large-signal S-parameters as a function of input power, you can specify frequency points of interest using opCon and opVal arguments.

  • When plotting large-signal S-parameters as a function of frequency, you can specify input power levels of interest using opCon and opVal arguments.

  • When plotting parameters as a function of an operating condition, you can specify both frequency and input power values using opCon and opVal arguments.

Enter the getop(h) command at the command line to get the operating conditions for the RF circuit object h.

Value of the operating conditions specified using the opCon argument, specified as a scalar.

Example: semilogx(h,'Pout','Pin','mW','bias',1.5) plots the data using a logarithmic scale for the x-axis for circuit object, h, with opCon set to 'bias' and value set to 1.5.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: semilogx(h,'Pout','Pin','mW','bias',1.5,'Freq',2.4)

Frequency value used to plot the data using a logarithmic scale for the x-axis, specified as the comma-separated pair consisting of 'Freq' and a positive scalar in Hz.

Input power level used to plot the data using a logarithmic scale for the x-axis, specified as the comma-separated pair consisting of 'Pin' and a scalar in dBm.

Output Arguments

collapse all

Lineseries object, returned as a column vector of object handles.

Tips

  • Use the Property Editor (propertyeditor) or the MATLAB set function to change Line Properties.

    Note

    Use the MATLAB semilogx function to create a semi-log scale plot of network parameters that are specified as vector data and are not part of a circuit (rfckt) object or data (rfdata) object.

Introduced in R2007a