MATLAB: How to design odd ordered filters using the FIRRCOS function in Signal Processing Toolbox

evenfirrcosorderSignal Processing Toolbox

I would like to design an odd ordered FIR raised cosine filter using the following code:
coefs = firrcos(255, 364e3/2, 0.4, 17.6832e6, 'rolloff');
When I do so, however, the results appear to be the same as if I had used the following code:
coefs = firrcos(256, 364e3/2, 0.4, 17.6832e6, 'rolloff');
and then removed a single coefficient.

Best Answer

This enhancement has been incorporated in Signal Processing Toolbox 6.5 (R2006a).
For product releases since R2006a, the FIRRCOS function can only be used to design even-ordered filters.
The reason it is not possible to design an odd order raised cosine filter is because theoretically it does not make sense to have such design.
The algorithm for the function FIRRCOS is to sample the impulse response of a raise cosine rolloff filter at N (where N is the filter order) sample times starting at -(N/2)/Fs and ending at (N/2)/Fs. The resulting filter is the raised cosine window that includes the 0 point and is symmetric around 0. If you make the order of the filter odd, then the window symmetry is lost. You want to shape the communication symbols with a symmetric window whose largest value is at the middle of the symbol, otherwise the pulse shaping will be incorrect.