フィルターのクリア

What the calc is this?

2 ビュー (過去 30 日間)
Matheus Tirado
Matheus Tirado 2023 年 6 月 28 日
コメント済み: Rena Berman 2023 年 12 月 5 日
p=[1 -1 -2];
Roots(p)
i=0:20
yi=A1*z^i+A2*z^i;
stem(yi)
B=[1 1],
A=[1];
N=1:50;
Xn=cos(pi*n)
Yn=filter(b,a,xn);
Stem(n,yn)
  4 件のコメント
DGM
DGM 2023 年 11 月 29 日
Google doesn't have this cached (maybe it got purged). Is there a way these things can be reverted from the database?
Rena Berman
Rena Berman 2023 年 12 月 5 日
undefined

サインインしてコメントする。

回答 (1 件)

Keerthi Reddy
Keerthi Reddy 2023 年 6 月 30 日
Hi Matheus, It is my understanding that you want to know what the above-mentioned calculation represents.
Here is the answer:
p = [1 -1 -2];
r = roots(p);
disp(r);
To calculate the roots of a polynomial 'p', you can use the “roots” function in MATLAB. The output will be the roots of the polynomial 'p'. You can go through this documentation to know more: Polynomial roots - MATLAB roots - MathWorks India
z = 0.9; % Choose a value for z
A1 = 1; % Choose a value for A1
A2 = 2; % Choose a value for A2
i = 0:20;
yi = A1*z.^i + A2*z.^i;
stem(i, yi);
The above code generates a sequence yi = A1*z^i + A2*z^i for i ranging from 0 to 20 and plots it using a stem plot. You can go through the documentation to know more: Plot discrete sequence data - MATLAB stem - MathWorks India
If you have a transfer function defined by numerator B and denominator A, and you want to filter a sequence xn using this transfer function, you can use the filter function. The following code does the same. B = [1 1];
A = [1];
n = 1:50;
xn = cos(pi*n);
yn = filter(B, A, xn);
stem(n, yn);
You can go through this documentation to know more: 1-D digital filter - MATLAB filter - MathWorks India.
Hope this helps .

カテゴリ

Help Center および File ExchangeDigital Filtering についてさらに検索

タグ

製品


リリース

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by