Clear Filters
Clear Filters

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

4 views (last 30 days)
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.

Answers (1)

Star Strider
Star Strider on 12 Apr 2024
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!
.

Tags

Community Treasure Hunt

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

Start Hunting!