对称移位高斯脉冲

时间:2018-04-16 22:29:27

标签: matlab signal-processing gaussian

考虑这个简短的代码:

fc=2e9;
fs = 100e9;
for n=1:2
  tc = gmonopuls('cutoff',fc);
  t{n}  = -2*tc:1/fs:2*tc;
  y{n} = gmonopuls(t{n}+n*5e-11,fc);
  fc=fc+5e3;
end
plot(t{1},y{1},'r',t{2},y{2},'k')

它产生两个高斯单脉冲移位了一点:

shifted gaussian pulse

我的问题是:我如何使这种对称?注意尾部是如何匹配的......红色和黑色脉冲都是零。我是matlab中信号处理工具箱的新手,想要修改下面的代码,以便匹配头

1 个答案:

答案 0 :(得分:2)

gmonopuls计算以0:

为中心的高斯脉冲
t = -2*tc:1/fs:2*tc;
y = gmonopuls(t,fc);
plot(t, y, 'k');

enter image description here

在不同时刻评估此功能不会改变曲线的基本形状。它只会改变您采样的曲线的哪一部分:

K = 2*tc;
for n=1:3
  t{n} = -2*tc:1/fs:2*tc + (n-2)*K;
  y{n} = gmonopuls(t{n},fc);
end
plot(t{1},y{1},'rx', t{2},y{2},'k', t{3},y{3},'bs');
legend('t-K','t','t+K');

enter image description here

要获得沿时间轴移动的曲线,您只需在计算函数后添加时间偏移量

for n=1:2
  tc = gmonopuls('cutoff',fc);
  t{n} = -2*tc:1/fs:2*tc;
  y{n} = gmonopuls(t{n},fc);
  t{n} = t{n} - n*5e-11;
  fc=fc+5e3;
end
plot(t{1},y{1},'r',t{2},y{2},'k')

enter image description here