필터 지우기
필터 지우기

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 CenterFile Exchange에서 Digital Filtering에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by