Main Content

plot

System object: phased.FMCWWaveform
Namespace: phased

Plot FMCW waveform

Syntax

plot(Hwav)
plot(Hwav,Name,Value)
plot(Hwav,Name,Value,LineSpec)
h = plot(___)

Description

plot(Hwav) plots the real part of the waveform specified by Hwav.

plot(Hwav,Name,Value) plots the waveform with additional options specified by one or more Name,Value pair arguments.

plot(Hwav,Name,Value,LineSpec) specifies the same line color, line style, or marker options as are available in the MATLAB® plot function.

h = plot(___) returns the line handle in the figure.

Input Arguments

Hwav

Waveform object. This variable must be a scalar that represents a single waveform object.

LineSpec

Character vector to specifies the same line color, style, or marker options as are available in the MATLAB plot function. If you specify a PlotType value of 'complex', then LineSpec applies to both the real and imaginary subplots.

Default: 'b'

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.

PlotType

Specifies whether the function plots the real part, imaginary part, or both parts of the waveform. Valid values are 'real', 'imag', and 'complex'.

Default: 'real'

SweepIdx

Index of the sweep to plot. This value must be a positive integer scalar.

Default: 1

Output Arguments

h

Handle to the line or lines in the figure. For a PlotType value of 'complex', h is a column vector. The first and second elements of this vector are the handles to the lines in the real and imaginary subplots, respectively.

Examples

expand all

Create and plot an upsweep FMCW waveform.

waveform = phased.FMCWWaveform('SweepBandwidth',100.0e3,...
    'OutputFormat','Sweeps','NumSweeps',2);
plot(waveform)