System object: phased.MFSKWaveform
Package: phased

Plot continuous MFSK waveform


h = plot(___)


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

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

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

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

Input Arguments

expand all

MFSK waveform, specified as a phased.MFSKWaveform System object.

Example: sMFSK = phased.MFSKWaveform;

Plot style, specified as a character vector. You can specify the same line color, style, or marker options that 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.

Example: 'k.'

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.

Waveform component to plot, specified as the comma-separated pair consisting of 'PlotType' and one of the following:

  • 'real' — Plots the real part of the waveform

  • 'imag' — Plots the imaginary part of the waveform

  • 'complex' — Plots both parts of the waveform

Example: 'PlotType','complex'

Index of the step to plot, specified as the comma-separated pair consisting of 'StepIdx' and a positive integer. If you specify a 'StepIdx' value greater than 'StepsPerSweep', the frequency corresponds to the mod('StepIdx','StepsPerSweep') value.

Output Arguments

expand all

Plot handle(s) to the line or lines in the figure, returned as a double. When PlotType is set to 'complex', h is a 2-by-1 column vector. The first and second elements of this vector are the handles to the lines in the real and imaginary subplots, respectively.


expand all

Construct an MFSK waveform with a sample rate of 1 MHz and a sweep bandwidth of 0.1 MHz. Assume 52 steps with a step time of 4 milliseconds. Set the frequency offset to 1 kHz. There are 4000 samples per step.

fs = 1e6;
fsweep = 1e5;
tstep = 4e-3;
numsteps = 52;
foffset = 1000;
noutputsteps = 4;
sMFSK = phased.MFSKWaveform('SampleRate',fs,...

Plot the real and imaginary components of the second step of the waveform using the plot method. Set the plot color to red.


Introduced in R2015a