verticalBathtub
(Removed) Vertical bathtub curve
Syntax
Description
Examples
Horizontal and Vertical Bathtub Curve Methods
Display the eye diagram for a waveform having dual-dirac and random jitter. Generate and plot the horizontal and vertical bathtub curves.
Specify the sample rate, the samples per symbol, and the number of traces parameters.
fs = 1000; sps = 200; numTraces = 1000;
Create an eye diagram object.
ed = comm.EyeDiagram('SampleRate',fs,'SamplesPerSymbol',sps, ... 'SampleOffset',sps/2,'DisplayMode','2D color histogram', ... 'ColorScale','Logarithmic','EnableMeasurements',true, ... 'ShowBathtub','Both','YLimits',[-1.2 1.2]);
Generate a waveform having dual-dirac and random jitter. Specify 3 ms rise and fall times.
src = commsrc.pattern('SamplesPerSymbol',sps, ... 'RiseTime',3e-3,'FallTime', 3e-3); src.Jitter = commsrc.combinedjitter('RandomJitter','on', ... 'DiracJitter','on','DiracDelta',[-5e-04 5e-04],'RandomStd',2e-4);
Generate two symbols for each trace.
x = src.generate(numTraces*2);
Pass the signal through an AWGN channel with a fixed seed for repeatable results.
randStream = RandStream('mt19937ar','Seed',5489); y = awgn(x,30,'measured',randStream);
Display the eye diagram.
ed(y)
Generate the horizontal bathtub data for the eye diagram. Plot the curve.
hb = horizontalBathtub(ed) semilogy([hb.LeftThreshold],[hb.BER],'b', ... [hb.RightThreshold],[hb.BER],'b') grid
hb = 1x13 struct array with fields: BER LeftThreshold RightThreshold
Generate the vertical bathtub data for the eye diagram. Plot the curve.
vb = verticalBathtub(ed) semilogx([vb.BER],[vb.LowerThreshold],'b', ... [vb.BER],[vb.UpperThreshold],'b') grid
vb = 1x13 struct array with fields: BER UpperThreshold LowerThreshold
Input Arguments
ed
— Eye Diagram System object
System object
Eye Diagram System object, where you get the bathtub curve information from.
Output Arguments
s
— Structure containing information
struct
Structure containing information about the vertical bathtub curve.
BER
— Bit error rate values
scalar
Bit error rate values, mapped on the Y-axis of the verticalBathtub plot against
the corresponding UpperThreshold
and
LowerThreshold
values on the x-axis, specified as a
scalar.
Data Types: double
UpperThreshold
— Upper threshold value
scalar
Upper threshold value, mapped on the x-axis in the plot against its
corresponding BER
value on the x-axis.
Data Types: double
LowerThreshold
— Lower threshold value
scalar
Lower threshold value, mapped on the x-axis in the plot against its
corresponding BER
value on the x-axis.
Data Types: double
Version History
Introduced in R2016bR2022a: comm.EyeDiagram
has been removed
verticalBathtub has been removed. To display the eye diagram of a signal, use the eyediagram
function instead.
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)