function Signal = LinearModulation( Symbols, Pulse, fsT )
% LinearModulation - linear modulation of symbols with given
%                    pulse shape
%
% A sequence of information symbols is linearly modulated. Pulse
% shaping is performed using the pulse shape passed as input 
% parameter Pulse. The integer fsT indicates how many samples 
% per symbol period are taken. The length of the Pulse vector may
% be longer than fsT; this corresponds to partial-response signaling.
%
% Inputs:
%   Symbols - vector of information symbols
%   Pulse   - vector containing the pulse used for shaping
%   fsT     - (integer) number of samples per symbol period
%
% Syntax:
%   Signal = LinearModulation( Symbols, Pulse, fsT )

% initialize storage for Signal
LenSignal = length(Symbols)*fsT + (length(Pulse))-fsT;
Signal    = zeros( 1, LenSignal );

% loop over symbols and insert corresponding segment into Signal
for kk = 1:length(Symbols)
    ind_start = (kk-1)*fsT + 1;
    ind_end   = (kk-1)*fsT + length(Pulse);
    
    Signal(ind_start:ind_end) = Signal(ind_start:ind_end) + ...
                                Symbols(kk) * Pulse;
end
