%% Output:
%% - x: pulse-shaped waveform
- filter = comm.RaisedCosineTransmitFilter...
+ txfilter = comm.RaisedCosineTransmitFilter...
('Shape', 'Square root', ...
'RolloffFactor', rolloff, ...
'FilterSpanInSymbols', span, ...
'OutputSamplesPerSymbol', sps, ...
'Gain', sqrt(sps)); % so that output has energy 1
- x = filter([modData; zeros(span, 1)]);
+
+ coef = coeffs(txfilter);
+ filter_fft = fft(coef.Numerator, length(modData) * sps);
+ modData_fft = fft(upsample(modData, sps));
+ x = ifft(modData_fft .* filter_fft.');
+ l = (length(coef.Numerator) - 1) / 2;
+ x = [x(l:end); x(1:l-1)];
end