| 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(...,colr);
[b,sample_time] = rcosfir(...);
Optional Inputs
| Input |
Default Value |
n_T |
[-3,3] |
rate |
5 |
T |
1 |
Description
The rcosfir function designs the same filters that the rcosine function designs when the latter's type_flag argument includes 'fir'. However, rcosine is somewhat easier to use.
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. rate must be greater than 1. 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
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(...,colr)
uses the string colr to determine the plotting color. The choices for colr 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
rcosiir, rcosflt, rcosine, firrcos, rcosdemo
References
Korn, Israel, Digital Communications, New York, Van Nostrand Reinhold, 1985.
| randsrc | rcosflt | ![]() |