Chromatic dispersion and line width phase noise
[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, ...
15 'OutputSamplesPerSymbol', sps);
16 x = filter([modData; zeros(span, 1)]);
17end