Filter is a one-dimensional digital filter.
Using Method y = filter (B, A, x), input x is the pre-filter sequence, Y is the filter result sequence, B/A provides the filter coefficient, B is the molecule, and a is the denominator.
The entire filtering process is implemented through the following difference equation:
A (1) * Y (n) = B (1) * x (n) + B (2) * X (n-1) +... + B (Nb + 1) * x (n-Nb) MATLAB Chinese Forum
-A (2) * Y (n-1)-...-A (Na + 1) * Y (n-Na)
Book.ilovematlab.cn
[Y, ZF] = filter (B, A, X, zi), input x is the pre-filter sequence, Y is the filter result sequence, and B/A provides the filter coefficient, B is the numerator, and a is the denominator,
Simulation and signal processing
Input the initial state of X specified by Zi, and ZF is the final state vector.
Filter (B, A, X, [], dim) or filter (B, A, X, Zi, dim) Specify the dimension dim of X to operate book.ilovematlab.cn
Example K =-100:100;
> UK = [zeros (1,100), ones (1,101)];
> A = [1-5 6];
> B = [2-1];
> X = UK;
> Y = filter (B, A, X)