Advertisement
Guest User

Untitled

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