1
$\begingroup$

When I take the $Z$-Transform of the Floor function:

ZTransform[ Floor[x], x, z]

I get

z/(-1 + z)^2

But when I do:

InverseZTransform[ z/(-1 + z)^2, z, x]
x

... rather than Floor[x]...

Is this an error in Mathematica or is my understanding wrong?

Is there a way to take the discrete-time $Z$-transform on a list, say: { 1, 2, 3, 4, 5, 6, 7, 8, 9}... and then the inverse $Z$-transform?

| improve this question | | | | |
$\endgroup$
  • $\begingroup$ Hi and welcome to Mathematica.SE! You might want to have a look at the formatting help so you can format your code. $\endgroup$ – Verbeia Apr 13 '14 at 13:00
  • $\begingroup$ From the definition of the z transform it seems to follow that x is an integer. So Floor[x] or x should be the same. $\endgroup$ – Sjoerd C. de Vries Apr 13 '14 at 13:40
3
$\begingroup$

From definition

Mathematica graphics

so f[z] is evaluated first, if known, and then the ztransform is computed. So what you get back is the value of of the function, not the function itself. In this case, Mathematica simplified Floor[x] to x, which I think due to the discrete assumption in the definition. I tested this in Maple, and Maple did the same assumption.

f = {Floor[x], Ceiling[x], Round[x]};
ZTransform[f, x, z]

Mathematica graphics

All the functions f produced the same ztransform. Since all the functions evaluated to same value, which is x

InverseZTransform[%, z, x]
(* {x, x, x} *)

If the function whose ztranform you are trying to find can't be evaluated, Mathematica does not give a ztransform for

 ZTransform[foo[x], x, z]

Mathematica graphics

Is there a way to take the discrete-time Z-transform on a list, say: { 1, 2, 3, 4, 5, 6, 7, 8, 9}... and then the inverse Z-transform?

list = {1, 2, 3, 4, 5, 6, 7, 8, 9};
ZTransform[list, x, z]

Mathematica graphics

InverseZTransform[%, z, x]

Mathematica graphics

| improve this answer | | | | |
$\endgroup$
  • $\begingroup$ I tried to use the partial fraction expansion: Apart[z/(-1 + z)^2] = 1/(-1 + z)^2 + 1/(-1 + z) and InverseZTransform[1/(-1 + z)^2, z, x] + InverseZTransform[1/(-1 + z), z, x] = UnitStep[-1 + x] + (-1 + x) UnitStep[-1 + x]... The function seems to give the correct step function in the interval [0,1]: Plot[UnitStep[-1 + x] + (-1 + x) UnitStep[-1 + x], {x, 0, 10}] $\endgroup$ – user13675 Apr 13 '14 at 14:47
  • $\begingroup$ And Table[UnitStep[-1 + x] + (-1 + x) UnitStep[-1 + x], {x, 1, 10}] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} $\endgroup$ – user13675 Apr 13 '14 at 15:10
2
$\begingroup$

Is there a way of taking a list and taking its ZTransform and inverse? Here's one way that applies the definition of the ZTransform directly (which is straightforward, since there are only a finite number of terms in the sum).

list = {5, 3, -2, 0, 4, -3};
h[z_] = Sum[list[[i]] z^-i, {i, 1, Length[list]}]

enter image description here

This can then be put through the inverse transform:

q[n_] = InverseZTransform[h[z], z, n]
DiscretePlot[q[n], {n, -17, 17}, PlotRange -> All]

enter image description here

which returns the same values as were in the list.

Observe that this answer is different from Nasser's. Since the ZTransform threads through lists, the function ZTransform[{1,2,3},n,z] is taking the ZTransform of the function that is 1 for all n, then the ZTransform of the function that is 2 for all n, etc.

| improve this answer | | | | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.