MATLAB filter function usage

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.