Plotting Eye Diagram (2-D plot) from ADS Data in MATLAB
Show older comments
I have a data file (`Sample_Eye_1.txt` - attched) which I obtained from the simulation plot of ADS Keysight. It has 3 fields - `"Index", "Time" and "Voltage"`. Now the eye diagram plot will be `voltage vs time`. There can be different voltages at the same time at only different index. So index can be seen as a data filter field or similar like that. The plot in ADS simulation is in the below. You can see that the line plot is plotted like it is superimposed on different lines.
Now when I plot data in MATLAB `voltage vs time`, it is not superimposed somehow. Below picture is the generated plot of my Matlab code which is just a simple XY plot.
My MATLAB code:
% open data file
fid = fopen('Sample_Eye_1.txt');
% Read data in from csv file
readData = textscan(fid,'%f %f %f','Headerlines',1,'Delimiter',',');
% Extract data from readData
index_Data = readData{1,1}(:,1);
xData = readData{1,2}(:,1);
yData = readData{1,3}(:,1);
% Plot Data
f1 = figure(1);
cla; hold on; grid on;
%set(gca, 'XTick',[0 5 10 15 20 25 30]);
%set(gca,'XTick',0:0.1e-8:1e-8)
%set(gca,'XTickLabel',0:1:10)
plot(xData,yData,'r-');
title('Eye Diagram')
xlabel('Time(ns)')
ylabel('Density(V)')
Can anyone help me to generate the plot like the plot of ADS simulation plot?
Note: The data is big (around 2.7 Mb). If I truncate the data, the problem cannot be fully understood.
Answers (0)
Categories
Find more on Polar Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!