I have the following equation:
x(n)= 3(0.25^n)u(n)-(0.75^(n-1))u(n-1)
hot would I input this to solve using matlab?

1 件のコメント

Christopher Guerrero
Christopher Guerrero 2017 年 6 月 2 日
More specifically sorry for not putting this I am looking for how to put this in and get the ztransform answer out.

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

 採用された回答

Star Strider
Star Strider 2017 年 6 月 2 日

0 投票

If you have the Symbolic Math Toolbox:
syms n t z
u(n) = heaviside(n);
x(n)= 3*(0.25^n)*u(n)-(0.75^(n-1))*u(n-1);
X = ztrans(x, n, z); % Z-Transform
[Xn,Xd] = numden(X);
Xd = expand(Xd);
H(z) = Xn / Xd; % Transfer Function
H(z) =
-(- 48*z^3 + 40*z^2 + 17*z - 3)/(32*z^3 - 32*z^2 + 6*z)

3 件のコメント

Christopher Guerrero
Christopher Guerrero 2017 年 6 月 2 日
How can i get the z transform answer
Christopher Guerrero
Christopher Guerrero 2017 年 6 月 2 日
>> syms n t z >> u(n) = heaviside(n)
u(n) =
heaviside(n)
>> x(n)= 3*(0.26^n)*u(n)-(-0.75^(n-1))*u(n-1)
x(n) =
3*(13/50)^n*heaviside(n) + (3/4)^(n - 1)*heaviside(n - 1)
>> x = ztrans(x, n, z)
x(z) =
(1/((4*z)/3 - 1) + 1/2)/z + 3/((50*z)/13 - 1) + 3/2
>> pretty(x)
1
------- + 1/2
4 z
--- - 1
3 3
------------- + -------- + 3/2
z 50 z
---- - 1
13
I used this for just the z transform does this look correct?
Star Strider
Star Strider 2017 年 6 月 2 日
That looks like a continued fraction expansion of some sort. The approach I took created what appears to be a transfer function with distinct numerator and denominator polynomials.
I’ve not done a hand version of the conversion of a difference equation to a z-transform in decades. I’m comfortable with whatever the Symbolic Math Toolbox calculates!

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by