| Communications Toolbox | ![]() |
Design a raised cosine FIR filter
Syntax
b = rcosfir(R,n_T,rate,T);
b = rcosfir(R,n_T,rate,T,filter_type);
rcosfir(...);
rcosfir(...,color);
[b,sample_time] = rcosfir(...);
Optional Inputs
| Input |
Default Value |
n_T |
[-3,3] |
rate |
5 |
T |
1 |
Description
The time response of the raised cosine filter has the form
b = rcosfir(R,n_T,rate,T)
designs a raised cosine filter and returns a vector b of length(n_T(2) - n_T(1))*rate + 1. The filter's rolloff factor is R, where
. T is the duration of each bit in seconds. n_T is a length-two vector that indicates the number of symbol periods before and after the peak response. rate is the number of points in each input symbol period of length T. The input sample rate is T samples per second, while the output sample rate is T*rate samples per second.
The order of the FIR filter is
(n_T(2)-n_T(1))*rate
The arguments n_T, rate, and T are optional inputs whose default values are [-3,3], 5, and 1, respectively.
b = rcosfir(R,n_T,rate,T, designs a square-root raised cosine filter if filter_type)
filter_type is 'sqrt'. If filter_type is 'normal' then this syntax is the same as the previous one.
The impulse response of a square root raised cosine filter is
rcosfir(...)
produces plots of the time and frequency responses of the raised cosine filter.
rcosfir(...,color)
uses the string color to determine the plotting color. The choices for color are the same as those listed for the plot function.
[b,sample_time] = rcosfir(...)
returns the FIR filter and its sample time.
Examples
The commands below compare different rolloff factors.
rcosfir(0); subplot(211); hold on; subplot(212); hold on; rcosfir(.5,[],[],[],[],'r-'); rcosfir(1,[],[],[],[],'g-');
See Also
rcosflt, rcosiir, firrcos (Signal Processing Toolbox)
References
Korn, Israel. Digital Communications. New York: Van Nostrand Reinhold, 1985.
| randsrc | rcosflt | ![]() |