MATLAB: How to generate a pulse train of sine waveforms

phasedpulse repetition frequencypulse trainpulse widthradar signalssine waveformzeros

The pulse train needs to be a function of parameters such as pulse-width (PW), pulse repetition frequency (PRF), sampling rate, amplitude, etc.
I know that I can use zeros() to implement a delay between consecutive pulses, in order to represent the pulse train's PRF.

Best Answer

You can take a look at the pulstran function in Signal Processing Toolbox. Here is an example
prf = 1; pw = 0.1;
fs = 1000; f = 20;
T = 0:1/fs:3-1/fs;
D = 0:1/prf:3-1/prf;
Y = pulstran(T,D,@(t)sin(2*pi*f*t).*(t>=0).*(t<pw));
plot(T,Y)
Related Question