필터 지우기
필터 지우기

Inverse z-Transform

조회 수: 11 (최근 30일)
Angelo Cacini
Angelo Cacini 2019년 8월 25일
댓글: Walter Roberson 2019년 8월 28일
I'm trying to compute the inverse Z-transform of and expecting to obtain as result.
Here is the code I'm using:
syms z n x(n) X(z)
assume(n>=0 & in(n,'integer'));
X(z) = ztrans(x)
y = iztrans(X/z)
The answer I get is (same result using simplify):
Where am I wrong ?
Thanks in advance.

채택된 답변

Sai Sri Pathuri
Sai Sri Pathuri 2019년 8월 28일
You are using syms function to create the functions x(n) and X(z). When you go through the documentation of syms function, you can find that you are just creating symbols for the functions, but not defining or assigning them to any symbolic expressions. This might be the reason why you are not getting the expected result.
The ztrans function is not calculating the z-transform of the function x(n) because it is not defined, or it is abstract.
You may use the following link to refer about creation of symbolic functions using syms function
  댓글 수: 2
Angelo Cacini
Angelo Cacini 2019년 8월 28일
Dear Sai, many thanks for your answer and your time.
I'm not assigning the body of the functions but just the relationship between and .
I've tried the following (similar) code in the Laplace domain, and it worked as expected.
syms s t y(t) Y(s)
assume(t>=0);
Y(s) = laplace(y);
% Returns 'y(t)' as expected
ilaplace(Y)
% Returns 'diff(y) + y(0) delta(t)' as expected
ilaplace(s*Y)
I expected a similar behavior also for Z-transform (see below).
syms z n x(n) X(z)
assume(n>=0 & in(n,'integer'));
% This express the relationship between x(n) -> X(z)
X(z) = ztrans(x)
% Returns 'x(n)' as expected
iztrans(X)
% Returns 'iztrans(ztrans(x(n),n,z)/z,z,n)'
% but I expected 'x(n-1)'
iztrans(X/z)
Thanks
Walter Roberson
Walter Roberson 2019년 8월 28일
iztrans(X/z) has to worry about the z == 0 case.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by