% initialize pulse width
t0 = 0;
t1 = 10;
t = t0: 0.01: t1;
% initialize number of pulses
nPulse = 4;
x = sin(t);
figure (1);
plot(t, x);
axis tight;
% initialize PRI (pulse repetition interval)
PRI = 20;
delay = zeros(1, PRI);
inputsignal = [x delay];
figure (2);
plot(inputsignal)
for i = 3: 5
inputsignal(:, i) = inputsignal(:, i - 2);
if i <= 4
for i = i + 1
inputsignal(:, i) = inputsignal(:, i - 2);
end
end
end
figure (3)
plot(inputsignal(:, i))
基本上,我想生成一串由零分隔的正弦曲线。具体来说,我想生成四个脉冲;每个脉冲后跟一个零向量。我希望得到一些输入信号= [x延迟x延迟x延迟x延迟]。
PRI参数定义应遵循每个脉冲的零。