Table Of Contents

filter_rcos

Version:
    Last Modified: March 15, 2017

    Applies a raised cosine filter. filter_rcos works column-wise for matrices.

    Syntax

    y = filter_rcos(x, Fd, Fs)
    y = filter_rcos(x, Fd, Fs, 'filtertype')
    y = filter_rcos(x, Fd, Fs, 'filtertype', r)
    y = filter_rcos(x, Fd, Fs, 'filtertype', r, delay)
    y = filter_rcos(x, Fd, Fs, 'filtertype', r, delay, tol)
    y = filter_rcos(x, Fd, Fs, 'filtertype/Fs')
    y = filter_rcos(x, Fd, Fs, 'filtertype/Fs', r, ...)
    y = filter_rcos(x, Fd, Fs, 'filtertype/filter', num)
    y = filter_rcos(x, Fd, Fs, 'filtertype/filter', num, den)
    y = filter_rcos(x, Fd, Fs, 'filtertype/filter', num, den, delay)
    [y, t] = filter_rcos(x, Fd, Fs, ...)
    Legacy name: rcosflt

    Inputs

    x

    Signal to filter. x is a real vector or an array of any dimension.

    Fd

    Sampling rate of x.

    Fs

    Sampling rate of y. Fs should be an integral multiple of Fd.

    'filtertype'

    Type of filter to be applied. filtertype is a string that accepts the following values:

    Name Description
    'fir', 'fir/normal'

    Applies a raised cosine FIR filter to x.

    'iir', 'iir/normal'

    Applies a raised cosine IIR filter to x.

    'fir/sqrt'

    Applies a square root raised cosine FIR filter to x.

    'iir/sqrt'

    Applies a square root raised cosine IIR filter to x.

    Default: 'fir', 'fir/normal'

    'filtertype/filter'

    Uses the filter you specified to filter x. The following inputs should be num, den, and delay. Otherwise, the following inputs should be r, delay, and tol.

    'filtertype/Fs'

    Does not upsample x before filtering.

    r

    Rolloff factor of the filter.

    Default: 0.5

    delay

    Group delay in input samples of the filter.

    Default: 3

    tol

    Tolerance in the IIR filter.

    Default: 0.01

    num

    Forward filter coefficients. num is a real vector.

    den

    Backward filter coefficients. den is a real vector.

    Default: [1]

    Outputs

    y

    Filtered signal. y is a real column vector or an array of any dimension.

    t

    Timestamp of the filtered signal. t is a real row vector.

    FD = 5
    FS = 50 
    X = [1 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 0 1 0 ... 
    0 0 1 0 1 1 1 1 0 0 0 1 0 1 1 0 1 0 0 1 ...
    1 0 1 1 0 0 1 1 0 1 0 0 0 0 0 0 1 0 0 1 ...
    1 0 0 0 1 0 0 1 1 1 0 0 0 0 0 1 1 1 0 1 ...
    0 0 1 1 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 1] 
    Y1 = filter_rcos(X, FD, FS)
    [Y2, T2] = filter_rcos(X, FD, FS, 'iir/sqrt/FS', 0.5, 2, 0.1)
    [num, den] = rcos(FD, FS, 'fir/sqrt', 0.5, 3, 0.01)
    [Y3, T3] = filter_rcos(X, FD, FS, 'fir/sqrt/filter', num, den, 3)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics