Message Boards Message Boards

0
|
9440 Views
|
4 Replies
|
4 Total Likes
View groups...
Share
Share this post:
GROUPS:

ZTransform of a sequence that changes its explicit formula

Posted 10 years ago

Hi, i was trying to calculate the Zeta-Transform of a sequence that changes its explicit formula, for example:

x(n)= n  for  n=2k
x(n) = 1/n for n=2k+1 

How could I do?

POSTED BY: Luca Pirozzi
4 Replies

In this case there is a closed form for the input and ZTransform seems to handle it.

ZTransform[x^((-1)^n), n, z]

(* Out[342]= (z (1 + x^2 z))/(x (-1 + z^2)) *)
POSTED BY: Daniel Lichtblau
Posted 10 years ago

Thanks for replying, so should i write as input:

ZTransform[x^((-1)^n), n, z] 
(* Out[342]= (z (1 + x^2 z))/(x (-1 + z^2)) *)

? If i do so, Wolfram doesn't compute it, trying to solve

342=(z (1 + x^2 z))/(x (-1 + z^2)) 

as an equation. As example, how could I write this? enter image description here

POSTED BY: Luca Pirozzi

You need to read up on basic Mathematica syntax, and become familiar with the input/output formatting.

Also please see this to understand how Mathematica formatting is done on this site. I showed both input and output in what is a very common and obvious manner, with the output enclosed in a Mathematica comment. How this became the above proposed input, while losing a final asterisk and thus that comment enclosure, escapes my understanding.

For the stated purposes it would be good to check Mathematica documentation on the function Piecewise and possibly also the UnitStep function. Either one can be used to handle the problem most recently posed.

ZTransform[UnitStep[n - 3]*n + UnitStep[2 - n], n, z]

(* Out[350]= (-1 + 2 z - z^3 + z^4)/((-1 + z)^2 z^2) *)

ZTransform[Piecewise[{{1, n < 3}}, n], n, z]

(* Out[349]= (-1 + 2 z - z^3 + z^4)/((-1 + z)^2 z^2) *)
POSTED BY: Daniel Lichtblau
Posted 10 years ago

Sorry for the post-format, but i had to write quite quickly. Thank you very much for the reply, it really helped and solved the problem.

POSTED BY: Luca Pirozzi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract