我在Simulink中新我使用MATLAB解释功能块来创建一个高斯脉冲发生器。
这是函数:
function y=mono_gauss(t)
fs=20E9; %sample rate-10 times the highest frequency
ts=1/fs; %sample period
t1=.5E-9; %pulse width(0.5 nanoseconds)
x=(t/t1).*(t/t1); %x=(t^2/t1^2)(square of (t/t1);
A=1;
y=(A*(t/t1)-ts).*exp(-x); %first derivative of Gaussian pulsefunction
end
问题是,该块的输出只产生一个脉冲,我的目标是产生脉冲序列就像一个脉冲发生器模块。任何解决方案?
你是最有可能的最好设计在MATLAB你的脉搏,然后使用Repeating Sequence在Simulink中使用它。
例如,在MATLAB
t = 0:0.01:1;
y = normpdf(t,0.5,0.05);
plot(t,y)
然后内Simulink中,
我也改变了模型求解的步长为0.01。
你需要玩弄各种这些参数来获得你想要的精确曲线。