Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fs = 100E9; % sample freq
- D = [2.5 10 17.5]' * 1e-9; % pulse delay times
- t = 0 : 1/fs : 2500/fs; % signal evaluation time
- w = 1e-9; % width of each pulse
- yp = pulstran(t,D,@rectpuls,w);
- %Generate a periodic Gaussian pulse signal at 10 kHz, with 50% bandwidth.
- %The pulse repetition frequency is 1 kHz, sample rate is 50 kHz, and pulse
- %train length is 10msec. The repetition amplitude should attenuate by 0.8
- %each time. The example uses a function handle to refer to the generator function.
- T = 0 : 1/50E3 : 10E-3;
- D = [0 : 1/1E3 : 10E-3 ; 0.8.^(0:10)]';
- Y = pulstran(T,D,@gauspuls,10E3,.5);
- plot(T*1e3,Y)
- xlabel('Time (ms)');
- ylabel('Amplitude');
- title('Gaussian Pulse Train');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement