MATLAB: Can any one tell me how to find z transform of unit step?

i have tried but ans isn't correct… like a=heaviside(n) ztrans(a) ans =
1/(z – 1) + 1/2
why 1/2 ???? plz help me out

Best Answer

The Heaviside function is defined.
From the documentation:
  • heaviside(x) returns the value 0 for x < 0, 1 for x > 0, and 1/2 for x = 0.
So these commands:
syms z
zth0 = ztrans(heaviside(sym(0)))
zth1 = ztrans(heaviside(sym(1)))
return:
zt0 =
z/(2*(z - 1))
zt1 =
z/(z - 1)
(in R2014b)