Plot +1 -1 -1 +1 and -1 +1 +1 -1 rectangular pulse
Show older comments
I would like to ask for advice to help me to plot the rectangular pulse having +1 -1 -1 +1 and -1 +1 +1 -1 in amplitude. Before, I plot with +1 -1 +1 -1 and +1 +1 -1 -1, and I managed to do it. Can anyone please advice me on this? Below is my code;
for m = 0:Npulses
if rem(m,2) == 0 %i is even
Tx1 = exp(1j*pi*gamma*(t-m*PRI).^2);
W=ones(size(t));
W(t<m*PRI)=0;
W(t>(m*PRI+tau))=0;
s1 = Tx1.*W+s1;
else
Tx2 = -exp(1j*pi*gamma*(t-m*PRI).^2);%
W=ones(size(t));
W(t<m*PRI)=0;
W(t>(m*PRI+tau))=0;
s1 = Tx2.*W+s1;
end
where Npulses is number of pulses and PRI is Pulse Repetitive Interval.
Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!