Added technical milestone report and changes to 1st presentation
[4yp.git] / txFilter.m
CommitLineData
1eeb62fb
AIL
1function x = txFilter(modData, rolloff, span, sps)
2 %% Transmitter pulse-shaping (root raised cosine) filter.
3 %% Inputs:
4 %% - modData: modulated data
5 %% - rolloff: rolloff factor in root raised cosine filter.
6 %% - span: filter span (number of symbols)
7 %% - sps: samples per symbol
8 %% Output:
9 %% - x: pulse-shaped waveform
10
11 filter = comm.RaisedCosineTransmitFilter...
12 ('Shape', 'Square root', ...
13 'RolloffFactor', rolloff, ...
14 'FilterSpanInSymbols', span, ...
f9a73e9e
AIL
15 'OutputSamplesPerSymbol', sps, ...
16 'Gain', sqrt(sps)); % so that output has energy 1
1eeb62fb
AIL
17 x = filter([modData; zeros(span, 1)]);
18end