eye_diag.m

来自「hspice toolbox with matlab.」· M 代码 · 共 35 行

M
35
字号
function [] = eye_diag(period,start_off,time,data,ylabel_str)

%clf;
hold on;
for i = 1:length(time)
   if time(i) > start_off
      break;
   end
end
data = data(i:length(data));
time = time(i:length(time));

time = time-time(1);
time_off = 0;
j = 1;
for i = 1:length(data)
   if (time(i) - time_off) > period
      j = 1;
      time_off = time_off + period;
      plot(time_per,data_per);
      data_per = zeros(1,1);
      time_per = zeros(1,1);
   end
   data_per(j) = data(i);
   time_per(j) = time(i) - time_off;
   j = j+1;
end

xlabel('Time (seconds)');
ylabel_str = strrep(ylabel_str, '_', '\_');
ylabel(ylabel_str);
title('Eye Diagram');
grid on
zoom on

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?