我是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问题是,块的输出只产生一个脉冲,而我的目标是产生一系列脉冲,就像脉冲发生器块一样。有什么解决方案吗?
发布于 2019-02-10 23:23:34
你最好在MATLAB中设计你的脉搏,然后在Simulink中使用Repeating Sequence。
例如,在MATLAB中
t = 0:0.01:1;
y = normpdf(t,0.5,0.05);
plot(t,y)

然后在Simulink中,

我还将模型求解器的步长更改为0.01。
您将需要尝试这些参数中的各种参数,以获得所需的精确曲线。
https://stackoverflow.com/questions/54609404
复制相似问题