pulse_re.m
上传用户:jy88362166
上传日期:2015-04-26
资源大小:3k
文件大小:1k
源码类别:

通讯编程文档

开发平台:

Matlab

  1. function [g,no] = pulse_re(BT,T,Ts,M,no)
  2. %++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3. % Filename: pulse_re.m
  4. %
  5. % Function call: output =>[g,no]
  6. % input  =>[BT,T,Ts,M,no];
  7. % Description:
  8. %
  9. % This routine generates pulse response g(t) = TT(t)*h(t)
  10. % TT(k*Ts) : square pulse center at 0
  11. % h(k*Ts)  : impulse response of Gaussian filter
  12. %
  13. % input: BT - BT product
  14. % T - period
  15. % Ts - sample period
  16. % M - no. of sample per bit
  17. % output: g - pulse response
  18. %
  19. % local var:  k - length of impulse response
  20. % SqPulse - square pulse
  21. % h - impulse response
  22. %
  23. % Author    : Jeff Laster, MPRG, Virginia Tech 
  24. %++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  25. %k = [(-3*M/2):(3*M/2)]; % length of impulse response g(t), 61, for M=20
  26. % This length is really all that is needed.
  27. k=[-40:40]; % Chen's values.  More than needed;
  28. % only introduces a little more delay
  29. alpha = sqrt(log(2))/(2*pi*BT);
  30. h = exp(-(k*Ts).^2/(2*alpha^2*T^2))/(sqrt(2*pi)*alpha*T);
  31. SqPulse = 1/T*ones(M,1);
  32. g = 1/M*conv(SqPulse,h);
  33. %figure(no)
  34. %subplot(1,1,1),plot(g)
  35. %title('Rect Pulse Response of Gaussian Filter');
  36. %xlabel( 'Sample at Ts');
  37. %ylabel( 'Normalized Magnitude');
  38. %grid;
  39. %no = no +1;