iztrans giving unexpected outputs

My textbook says that the invers Z transform is
My code says the invers is simply k
syms z k
E1 = z/((z-1)^2);
e1_k=iztrans(E1,k)
e1_k = 
k

4 Comments

Assuming the inv(z) to the left of the bracketed expression means "inverse z-transform", I don't see how the expression from the textbook could be correct. Even if there is typo and the denominator should be (z+1)^2, it's still incorrect (missing negative sign).
I tested more than just the example given and they were all way off, ;--; I feel like there must be some context for these problems im missing to use this function
Keep in mind that iztrans only applies to inverting the unilateral z-transform. If your book examples are for the bilateral z-transform, then there could be an issue. But that's not the issue for the example cited in the question.

Sign in to comment.

 Accepted Answer

Another way is to provide a proof by contradiction. Misprints can happen due to a lack of proofreading.
syms n
f1 = n*(-1)^n;
ztrans(f1)
ans = 
f2 = n;
ztrans(f2)
ans = 

2 Comments

I went back and tested more problems in the book, non of the answers match what the function returns ;--;
@Aidan, If it is deemed worthwhile for the MathWorks team to investigate the issue, you may take a screenshot of other z-transform problems from the textbook.

Sign in to comment.

More Answers (0)

Asked:

on 4 Mar 2025

Commented:

on 6 Mar 2025

Community Treasure Hunt

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

Start Hunting!