pulse_re.m
上传用户:jy88362166
上传日期:2015-04-26
资源大小:3k
文件大小:1k
- function [g,no] = pulse_re(BT,T,Ts,M,no)
- %++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- % Filename: pulse_re.m
- %
- % Function call: output =>[g,no]
- % input =>[BT,T,Ts,M,no];
- % Description:
- %
- % This routine generates pulse response g(t) = TT(t)*h(t)
- % TT(k*Ts) : square pulse center at 0
- % h(k*Ts) : impulse response of Gaussian filter
- %
- % input: BT - BT product
- % T - period
- % Ts - sample period
- % M - no. of sample per bit
- % output: g - pulse response
- %
- % local var: k - length of impulse response
- % SqPulse - square pulse
- % h - impulse response
- %
- % Author : Jeff Laster, MPRG, Virginia Tech
- %++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- %k = [(-3*M/2):(3*M/2)]; % length of impulse response g(t), 61, for M=20
- % This length is really all that is needed.
- k=[-40:40]; % Chen's values. More than needed;
- % only introduces a little more delay
- alpha = sqrt(log(2))/(2*pi*BT);
- h = exp(-(k*Ts).^2/(2*alpha^2*T^2))/(sqrt(2*pi)*alpha*T);
- SqPulse = 1/T*ones(M,1);
- g = 1/M*conv(SqPulse,h);
- %figure(no)
- %subplot(1,1,1),plot(g)
- %title('Rect Pulse Response of Gaussian Filter');
- %xlabel( 'Sample at Ts');
- %ylabel( 'Normalized Magnitude');
- %grid;
- %no = no +1;