1.14.1 example 1
Find the Z transform for the unit step discrete function
Given the unit step function \(x[n]=u[n]\) defined as \(x=\{1,1,1,\cdots \}\,\ \) for \(n\geq 0\,\), find its Z transform.
Mathematica
Remove["Global`*"];
ZTransform[UnitStep[n],n,z]
|
Out[] = z/(-1+z)
|
Matlab
syms n
pretty(ztrans(heaviside(n)))
|
1
----- + 1/2
z - 1
|
1.14.2 example 2
Find the Z transform for \(x[n]=\left ( \frac {1}{3}\right ) ^{n}u\left ( n\right ) +\left ( 0.9\right ) ^{n-3}u\left ( n\right ) \)
Mathematica
f[n_]:=((1/3)^n+(9/10)^(n-3))UnitStep[n];
ZTransform[f[n],n,z]
|
z (3/(-1+3 z)+10000/(729 (-9+10 z)))
|
Matlab
syms n
pretty(ztrans(
((1/3)^n+(0.9)^(n-3))
*heaviside(n)))
|
100 1
------------- + ------- + 1729/1458
81 (z - 9/10) 3 z - 1
|