Communications Toolbox | ![]() ![]() |
Filter the input signal using a raised cosine filter
Syntax
y = rcosflt(x,Fd,Fs); y = rcosflt(x,Fd,Fs,'filter_type'
,r,delay,tol); y = rcosflt(x,Fd,Fs,'filter_type/
Fs
'
,r,delay,tol); y = rcosflt(x,Fd,Fs,'filter_type/
filter
',num,den); y = rcosflt(x,Fd,Fs,'filter_type/
filter
',num,den,delay); y = rcosflt(x,Fd,Fs,'filter_type/
filter/Fs
',num,den...); [y,t] = rcosflt(...);
Optional Inputs
Input |
Default Value |
|
|
r |
0.5 |
delay |
3 |
tol |
0.01 |
den |
1 |
Description
The function rcosflt
passes an input signal through a raised cosine filter. You can either let rcosflt
design a raised cosine filter automatically or you can specify the raised cosine filter yourself using input arguments.
Designing the Filter Automatically
y = rcosflt(x,Fd,Fs)
designs a raised cosine FIR filter and then filters the input signal x
using it. The sample frequency for the digital input signal x
is Fd
, and the sample frequency for the output signal y
is Fs
. The ratio Fs/Fd
must be an integer. In the course of filtering, rcosflt
upsamples the data by a factor of Fs/Fd
, by inserting zeros between samples. The order of the filter is 1+2*delay*Fs/Fd
, where delay
is 3 by default. If x
is a vector, then the sizes of x
and y
are related by this equation.
Otherwise, y
is a matrix, each of whose columns is the result of filtering the corresponding column of x
.
y = rcosflt(x,Fd,Fs,'
designs a raised cosine FIR or IIR filter and then filters the input signal filter_type
',r,delay,tol)
x
using it. The ratio Fs/Fd
must be an integer. r
is the rolloff factor for the filter, a real number in the range [0, 1]. delay
is the filter's group delay, measured in input samples. The actual group delay in the filter design is delay/Fd
seconds. The input tol
is the tolerance in the IIR filter design. FIR filter design does not use tol
.
The characteristics of x
, Fd
, Fs
, and y
are as in the first syntax.
The fourth input argument, 'filter_type
', is a string that determines the type of filter that rcosflt
should design. Use one of the values in the table below.
y = rcosflt(x,Fd,Fs,'
is the same as the previous syntax, except that it assumes that filter_type
/
Fs
',r,delay,tol)
x
has sample frequency Fs
. This syntax does not upsample x
any further. If x
is a vector, then the relative sizes of x
and y
are related by this equation.
As before, if x
is a nonvector matrix, then y
is a matrix each of whose columns is the result of filtering the corresponding column of x
.
Specifying the Filter Using Input Arguments
y = rcosflt(x,Fd,Fs,'
filters the input signal filter_type/
filter
',num,den)
x
using a filter whose transfer function numerator and denominator are given in num
and den, respectively. If filter_type
includes fir
, then omit den
. This syntax uses the same arguments x
, Fd
, Fs
, and filter_type
as explained in the first and second syntaxes above.
y = rcosflt(x,Fd,Fs,'
uses filter_type/
filter
',num,den,delay)
delay
in the same way that the rcosine
function uses it. This syntax assumes that the filter described by num
, den
, and delay
was designed using rcosine
.
As before, if x
is a nonvector matrix, then y
is a matrix each of whose columns is the result of filtering the corresponding column of x
.
y = rcosflt(x,Fd,Fs,'
is the same as the earlier syntaxes, except that it assumes that filter_type
/
filter
/
Fs
',num,den...)
x
has sample frequency Fs
instead of Fd
. This syntax does not upsample x
any further. If x
is a vector, then the relative sizes of x
and y
are related by this equation.
Additional Output
[y,t] = rcosflt(...)
outputs t
, a vector that contains the sampling time points of y
.
See Also
rcosine
, rcosfir
, rcosiir
, rcosdemo
, grpdelay
References
Korn, Israel, Digital Communications, New York, Van Nostrand Reinhold, 1985.
![]() | rcosfir | rcosiir | ![]() |