How to get the Z-transform and tf of this function y[n] = 0,5y[n − 1] + x[n] ?

6 次查看(过去 30 天)
I don't know ho to write on matlab this EDD function, after that i can use ztrans() and tf(), but i need to know how to write it on matlab first.

回答(1 个)

Star Strider
Star Strider 2024-4-12
Perhaps something like this —
syms n x(n) y(n) z t X(z) Y(z)
assume(n>=0 & in(n,"integer"))
Eqn = y(n) == 0.5*y(n - 1) + x(n)
Eqn = 
Eqn = ztrans(Eqn, n, z)
Eqn = 
Eqn = subs(Eqn, {ztrans(y(n),n,z), ztrans(x(n),n,z)}, {Y(z), X(z)})
Eqn = 
Eqn = isolate(Eqn, Y)
Eqn = 
[N,D] = numden(rhs(Eqn))
N = 
D = 
Nc = sym2cell(N)
Nc = 1x1 cell array
{[z*y(-1) + 2*z*X(z)]}
Dc = sym2cell(D)
Dc = 1x1 cell array
{[2*z - 1]}
I leave the rest to you!
.

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by