filter_rcos (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info Download Help (Windows Only)

Owning Class: filter implementation

Requires: MathScript RT Module

Syntax

y = filter_rcos(x, Fd, Fs)

y = filter_rcos(x, Fd, Fs, 'Fs')

y = filter_rcos(x, Fd, Fs, 'filter type')

y = filter_rcos(x, Fd, Fs, 'filter type', r)

y = filter_rcos(x, Fd, Fs, 'filter type', r, delay)

y = filter_rcos(x, Fd, Fs, 'filter type', r, delay, tol)

y = filter_rcos(x, Fd, Fs, 'filter type/Fs')

y = filter_rcos(x, Fd, Fs, 'filter type/Fs', r, ...)

y = filter_rcos(x, Fd, Fs, 'filter type/filter', num)

y = filter_rcos(x, Fd, Fs, 'filter type/filter', num, den)

y = filter_rcos(x, Fd, Fs, 'filter type/filter', num, den, delay)

y = filter_rcos(x, Fd, Fs, 'filter type/filter/Fs', num, ...)

[y, t] = filter_rcos(x, Fd, Fs, ...)

Legacy Name: rcosflt

Description

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

Examples

Inputs

Name Description
x Specifies the signal to filter. x is a real vector or matrix.
Fd Specifies the sampling rate of x.
Fs Specifies the sampling rate of y. Fs should be an integral multiple of Fd.
'filter type' Specifies the type of filter to be applied. filter type is a string that accepts the following values:

 'fir', 'fir/normal' (default) 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.
'filter type/filter' Specifies to use the filter you specified to filter x. The following inputs should be num, den, and delay. Otherwise, the following inputs should be r, delay, tol.
'filter type/Fs' Specifies not to upsample x before filtering.
r Specifies the rolloff factor of the filter. The default is 0.5.
delay Specifies the group delay in input samples of the filter. The default is 3.
tol Specifies the tolerance in the IIR filter. The default is 0.01.
num Specifies the forward filter coefficients. num is a real vector.
den Specifies the backward filter coefficients. den is a real vector. The default is .

Outputs

Name Description
y Returns the filtered signal. y is a real column vector or matrix.
t Returns the timestamp of the filtered signal. t is a real row vector.

Details

The following table lists the support characteristics of this function.

 Supported in the LabVIEW Run-Time Engine Yes Supported on RT targets Yes Suitable for bounded execution times on RT Not characterized

Examples

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)