Designing Filters Automatically

The simplest syntax of rcosflt assumes that the function should both design and implement the raised cosine filter. For example, the command below designs an FIR raised cosine filter and then filters the input vector [1;0;0] with it. The second and third input arguments indicate that the function should upsample the data by a factor of 8 (that is, 8/1) during the filtering process.

y = rcosflt([1;0;0],1,8);

Types of Raised Cosine Filters

You can have rcosflt design other types of raised cosine filters by using a fourth input argument. Variations on the previous example are below.

y = rcosflt([1;0;0],1,8,'fir'); % Same as original example
y = rcosflt([1;0;0],1,8,'fir/sqrt'); % FIR square-root RC filter
y = rcosflt([1;0;0],1,8,'iir'); % IIR raised cosine filter
y = rcosflt([1;0;0],1,8,'iir/sqrt'); % IIR square-root RC filter


© 1994-2005 The MathWorks, Inc.