ctffilt
Syntax
Description
filters the input data y = ctffilt(B,A,x)x using Cascaded Transfer Functions (CTF) defined by the numerator and denominator coefficients B and
A, respectively.
Examples
Input Arguments
Output Arguments
More About
Tips
Algorithms
The ctffilt function uses the transposed direct form II structure
to implement the filter from the coefficients and gain in the cascaded transfer function
format.
Assume that the filter has l sections with coefficients bli and alj, derived from the matrices B,A in the CTF format, and
the scale value(s) g. The values i – 1 and j – 1 denote the exponents of z of the numerator and
denominator polynomials in the z-domain, respectively. The
ctffilt function normalizes ali and bli to αli and βli, respectively, ensuring that αl1 equals unity.
When you specify g as a scalar,
ctffilt assumes that g=gS, and the term gl does not apply in the normalization of the filter coefficients βli.
If the orders of the polynomial numerators and denominators are given as m and n, respectively, the filter has r = max(m,n) states per section. These states are located at the outputs of each z-1 delay block in the filter implementation diagram.
When you specify
zias a vector withrelements,ctffiltinitializes the filter states by setting ν1k = ν2k = … = νLk =zi(k)for k = 1, 2, …, r.When you specify
zias a vector, matrix, or multidimensional array withL*relements in its leading dimension,ctffiltinitializes the filter states by setting νlk =zi((l-1)*r+k)for k = 1, 2, …, r and l = 1, 2, …, L.
For each sample of x across the first array dimension whose size is
greater than 1 or across the dimension dim that you specify as
Dimension=dim, the ctffilt function computes
y by following the filter implementation based on the transposed direct
form II structure, updates the filter states νlk, and repeats this operation until it finishes filtering the last sample of
x.
When you specify to return
zf,ctffiltgathers the states νlk computed during the filtering of the last sample ofx, and stores them inzfaszf((l-1)*r+k)= νlk, for k = 1, 2, …, r and l = 1, 2, …, L.
References
[1] Lyons, Richard G. Understanding Digital Signal Processing. Upper Saddle River, NJ: Prentice Hall, 2004.
Extended Capabilities
Version History
Introduced in R2024b






