Main Content


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



lineseries = semilogy(h,parameter) plots the specified parameter in the default format using a logarithmic scale for the y-axis.

The semilogy function returns a column vector of handles to lineseries objects, one handle per line. This output is the same as the output returned by the MATLAB® semilogy function.

lineseries = semilogy(h,parameter1,...,parametern) plots the parameters parameter1, ..., parametern from the object h on an X-Y plane using a logarithmic scale for the y-axis.

lineseries = semilogy(h,parameter1,...,parametern,format) plots the parameters parameter1, ..., parametern in the specified format.

lineseries = semilogy(h,'parameter1',...,'parametern',format,x-axis parameter,x-axis format,'condition1',value1,..., 'conditionm',valuem, 'freq',freq,'pin',pin) plots the specified parameters at the specified operating conditions for the object h.


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


collapse all

Create an amplifier object from |default.s2p|.

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

Plot S11 using a log scale on the y-axis.

lineseries = semilogy(amp,'S11')

lineseries = 
  Line (S_{11}) with properties:

              Color: [0 0.4470 0.7410]
          LineStyle: '-'
          LineWidth: 0.5000
             Marker: 'none'
         MarkerSize: 6
    MarkerFaceColor: 'none'
              XData: [1x191 double]
              YData: [1x191 double]
              ZData: [1x0 double]

  Show all properties

Input Arguments

collapse all

h is the handle of a circuit (rfckt) object.

If h has multiple operating conditions, such as bias from a .p2d or .s2d file, the semilogy function operates as follows:

  • If you do not specify any operating conditions as arguments to the semilogy function, then the function plots the parameter values based on the currently selected operating condition.

  • If you specify one or more operating conditions, the semilogy function plots the parameter values based on those operating conditions.

  • When you use an operating condition for the x-axis parameter input argument, the function plots the parameters for all operating condition values.

format is the format of the data to be plotted.

Example: lineseries = semilogy(h,'S11','Magnitude (linear)')

Valid parameters of circuit objects, specified as a character vector or string.

Type listparam(h) to get a list of valid parameters for a circuit object, h. Type listformat(h,parameter) to see the legitimate formats for a specified parameter. The first listed format is the default for the specified parameter.

Example: lineseries = semilogy(h,'VSWRIn')

x-axis parameter is the independent variable along the x axis to plot the specified parameters along y axis. Several x-axis parameter values are available for all objects. When you import rfckt.amplifier, rfckt.mixer, or object specifications from a .p2d or .s2d file, you can also specify any operating conditions from the file that have numeric values, such as bias.

The following table shows the most commonly available parameters and the corresponding x-axis parameter values. The default settings listed in the table are used if x-axis parameter is not specified.

parameterx-axis parameter 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

Example: semilogy(h,'Pout','Freq')

x-axis format is the format used for the specific x-axis parameter. No x-axis format specification is needed when x-axis parameter is an operating condition.

The following table shows the x-axis format values that are available for the x-axis parameter values listed in the preceding table, along with the default settings that are used if x-axis format is not specified.

x-axis parameter valuesx-axis format values
PindBm (default), mW, W, dBW

THz, GHz, MHz, KHz, Hz

By default, x-axis format is chosen to provide the best scaling for the given x-axis parameter values.

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

Example: semilogy(h,'Pout','Freq','GHz')

Name-Value Pair Arguments

Example: semilogy(h,'Pout','Pin','Freq',2.1e9)

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

'condition1',value1, ..., conditionm,valuem are the optional condition/value pairs at which to plot the specified parameters. These pairs are usually operating conditions from a .p2d or .s2d file. For some parameters, you can specify a set of frequency or input power values at which to plot 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 condition/value pairs.

  • When plotting large-signal S-parameters as a function of frequency, you can specify input power levels of interest using condition/value pairs.

  • When plotting parameters as a function of an operating condition, you can specify both frequency and input power values using condition/value pairs.

Freq is the optional frequency value, in Hz, at which to plot the specified parameters.

Pin is the optional input power value, in dBm, at which to plot the specified parameters.


Introduced in R2007a