Main Content

semilogy

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

Description

example

semilogy(h,circuitPara) plots the circuit parameter circuitPara from the RFCKT or RF data object h using a logarithmic scale for the y-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 semilogy.

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

example

semilogy(___,xAxisPara,xAxisFmt) plots the circuit parameters circuitPara using a logarithmic scale for the y-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.

semilogy(___,opCon,opVal) plots the circuit parameters using a logarithmic scale for the y-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

semilogy(___,Name,Value) plots the data of a RFCKT or RF data object with name-value arguments.

example

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

Examples

collapse all

Create an amplifier object from default.s2p file.

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

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

lineseries = semilogy(h,'S11','S22');

Change the color of the S11 data.

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

Figure contains an axes object. The axes object with xlabel Freq [GHz], ylabel Magnitude (decibels) contains 2 objects of type line. These objects represent S_{11}, S_{22}.

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

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

Plot the output power of the amplifier.

semilogy(h,'Pout')

Figure contains an axes object. The axes object with xlabel P indexOf in baseline [dBm], ylabel dBm 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.

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

Figure contains an axes object. The axes object with xlabel P indexOf in baseline [mW], ylabel dBm 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.

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

Figure contains an axes object. The axes object with xlabel P indexOf in baseline [mW], ylabel dBm 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: semilogy(h,'Pout','Pin','mW') plots data using a logarithmic scale for the y-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: semilogy(h,'Pout','Pin','mW','bias',1.5) plots the data using a logarithmic scale for the y-axis for circuit object, h, with opCon set to 'bias' and value set to 1.5.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

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

Frequency value used to plot the data using a logarithmic scale for the y-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 y-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

Version History

Introduced in R2007a