function Pulse = Sinc( L, fsT )
% Sinc - sinc-pulse spanning L symbol periods
%
% Generate a sinc pulse spanning L symbol periods with fsT samples
% per symbol period. The maximum of the sinc function falls in the
% middle of the generated Pulse.
% 
% Inputs:
%   L   - number of symbol periods spanned by pulse
%   fsT - number of samples per symbol period
%
% Syntax:
%   Pulse = Sinc( L, fsT )

% time interval from -L/2 to (nearly) L/2
tt = ( 0 : L*fsT-1 ) / fsT - L/2;

% we're going to divide by tt, figure out where that's safe to do
safe_tt = ( tt ~= 0 );

Pulse = ones( 1, length(tt) );
Pulse( safe_tt ) = sin( pi*tt(safe_tt) ) ./ ( pi*tt(safe_tt) );
