0

The matrix X contained in a .mat file represents the acquired signal. The element of place (i, j) of the matrix is the i-th sample of the j-th screen. The sampling frequency is equal to 4 GS/s. How do I plot the eye diagram relative to the signal contained in X using MatLab? I tried but I could not draw the eye diagram from the matrix X (see http://ge.tt/8Xq5SYh/v/1?c). Here is the link to the matrix X that I used:

http://ge.tt/8Xq5SYh/v/0

and my MatLab code:

%sampling frequency fs=4 GS/s
rows=4000;    %4000 rows (samples)    |__ in matrix X
columns=10;   %1000 columns (screens) |

%for plot all the graphics in the same window (overlapping)
hold on;                 

%index of the single row (column for the single column)
row=1:1:100; 

t=1:1:100;
for column=1:columns,
   %plot
   plot(t,X(row, column),'-bo','LineWidth',1, 'MarkerEdgeColor','b', 'MarkerFaceColor','b', 'MarkerSize',2);  
end

%axis properties
set(gca,'YTick', [-0.5 -0.45 -0.4 -0.35 -0.3 -0.25 -0.2 -0.15 -0.1 -0.05 0 0.05 0.1   0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5]); %soli valori di ascisse da visualizzare
grid on; 
set(gca,'GridLineStyle','-');                                   
axis([0 10 -0.5 0.5]);                                       

Someone could try to show me how to do? maybe the matrix is not correct?

Thanks in advance to anyone who answers

Fobi
  • 435
  • 1
  • 7
  • 17

1 Answers1

1

You can simply plot(x,'b'). The plot command will draw a line for every column of x, which corresponds to all the samples of each "screen". The 'b' in the command is just to make every line the same color like a typical eye diagram.

shoelzer
  • 10,648
  • 2
  • 28
  • 49