Commit | Line | Data |
---|---|---|
1eeb62fb AIL |
1 | function 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)]); | |
17 | end |