【问题标题】:Plot an eye diagram of a signal in MatLab在 MatLab 中绘制信号的眼图
【发布时间】:2013-05-20 07:02:39
【问题描述】:

.mat 文件中包含的矩阵 X 表示采集的信号。矩阵的位置 (i, j) 的元素是第 j 个屏幕的第 i 个样本。采样频率等于 4 GS/s。 如何使用 MatLab 绘制相对于 X 中包含的信号的眼图? 我试过了,但我无法从矩阵 X 中画出眼图(参见http://ge.tt/8Xq5SYh/v/1?c)。这是我使用的矩阵 X 的链接:

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

还有我的 MatLab 代码:

%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]);                                       

有人可以尝试告诉我该怎么做吗? 也许矩阵不正确?

提前感谢任何回答的人

【问题讨论】:

    标签: matlab signal-processing sampling sample diagramming


    【解决方案1】:

    您可以简单地plot(x,'b')。 plot 命令将为x 的每一列画一条线,它对应于每个“屏幕”的所有样本。命令中的'b'只是为了让每一行的颜色都像典型的眼图一样。

    【讨论】:

    • 试试plot(X,'b') 没有循环或其他任何东西。那看起来应该是正确的。然后你就可以开始修改你喜欢的外观了。
    • 我得到了与上面链接相同的图片...然后我认为矩阵不正确...
    • 你觉得矩阵 X 怎么样?
    猜你喜欢
    • 1970-01-01
    • 2012-03-07
    • 2014-07-25
    • 2015-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多