function MFOut = DMF( Received, Pulse, fsT )
% DMF - digital matched filter
%
% Given a sequence of received samples, convolve the received signal with
% a pulse shape. Then down-sample to symbol rate.
%
% Inputs: 
%   Received - received signal (sampled at rated fsT samples per symbol)
%   Pulse    - impulse repsonse of matched filter
%   fsT      - samples per symbol period
%
% Output:
%   MFOut    - output of matched filter (at symbol rate)
%
% Example:
%   MFOut = DMF( Received, Pulse, fsT )

% convolve received signal with conjugate complex of 
% time-reversed pulse (matched filter)
Temp = conv( Received, conj( fliplr(Pulse) ) );

% down sample, at the end of each pulse period
MFOut = Temp( length(Pulse) : fsT : end );