Generate eye diagram
handle to the figure that contains the eye diagram. You can specify any of the input
argument combinations from the previous syntaxes.
h = eyediagram(___)
Generate an eyediagram of a filtered QPSK signal.
Generate random symbols. Apply QPSK modulation to get a modulated signal.
data = randi([0 3],1000,1); modSig = pskmod(data,4,pi/4);
Specify the number of output samples per symbol parameter. Create a transmit filter object,
sps=4; txfilter = comm.RaisedCosineTransmitFilter('OutputSamplesPerSymbol',sps);
Filter the modulated signal
txSig = txfilter(modSig);
Display the eye diagram.
x— Input signal
Input signal, specified as a numeric vector or numeric matrix.
The interpretation of
x and the number of plots depend on the
shape and complexity of
x is a real-valued two-column matrix, the function
interprets the first column as in-phase components and the second column as
quadrature components. The two components appear in different subplots of a single
x is a complex-valued vector, the function interprets
the real part as in-phase components and the imaginary part as quadrature
components. The two components appear in different subplots of a single figure
x is a real-valued vector, the function interprets the
vector as a real signal. The figure window contains a single plot.
Complex Number Support: Yes
n— Number of samples per trace
Number of samples per trace, specified as a integer greater than 1.
period— Trace period
1(default) | positive scalar
Trace period, specified as a positive scalar. The labels on the horizontal axis of
the eye diagram range between –
offset— Offset value
0(default) | integer in the range from 0 to (n–1)
plotstring— Plot attributes
'b-'(default) | character vector | string scalar
Plot attributes, specified as a character vector or string scalar containing symbols.
This argument sets the plotting symbol, line type, and color for the eye diagram.
The format and meaning of the symbols are the same as in the
plot function. For example, the default value
produces a solid blue line.
h— Figure handle
Figure handle to an existing figure that contains an eye diagram, specified as a
h must be a handle to a figure
eyediagram function previously generated.