ztrans command changing sample period

I have a question about MATLAB's ztrans function:
When I evaluate the command:
ztrans( exp(-t) )
I get the result:
ans =
z/(z - 1/exp(1))
Is there any way to change the sampling period MATLAB uses to calculate the z-transform? Right now it seems as if its using a default period of 1. Is it possible to have the function return a result such as:
z/(z - 1/exp(1 * T))

답변 (2개)

Paulo Silva
Paulo Silva 2011년 1월 25일

2 개 추천

easy question and easy answer
syms t T
ztrans(exp(-t*T))
ans =
z/(z - 1/exp(T))

댓글 수: 3

Walter Roberson
Walter Roberson 2011년 1월 25일
Scooped! :)
Paul Prechtl
Paul Prechtl 2023년 4월 6일
but here T plays the role of the inverse time constant and not the sampling time
Paul
Paul 2023년 4월 6일
편집: Paul 2023년 4월 6일
Even though ztrans yielded the desired result in this case, it's a bit misleading. Basically, ztrans is treating t as if its the integer independent variable of the sampled signal, even though that's not what t really represents. I think it's clearer to show in a few steps
syms x t
x = exp(-t)
x = 
syms n integer
syms T
xn = subs(x,t,n*T)
xn = 
syms z
X = ztrans(xn,n,z)
X = 
Or, using symfun objects
x(t) = exp(-t)
x(t) = 
X(z) = ztrans(x(n*T),n,z)
X(z) = 

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

Walter Roberson
Walter Roberson 2011년 1월 25일

0 개 추천

ztrans is not using a period: it is doing an infinite summation, as documented.
I do not have access to the Symbolic Math toolbox at the moment, but it would be interesting to
iztrans(z/(z - 1/exp(1 * T)),z)
and see what you would have to transform to get that result.

댓글 수: 2

Paulo Silva
Paulo Silva 2011년 1월 25일
iztrans(z/(z - 1/exp(T)),z)
ans=
((1/exp(T))^z*exp(T) - exp(T)*kroneckerDelta(z, 0))/exp(T) + kroneckerDelta(z, 0)
iztrans(z/(z - 1/exp(1)),z)
ans =
(6627126856707895/18014398509481984)^z
Paulo Silva
Paulo Silva 2011년 1월 25일
I made a mistake, it's
iztrans(z/(z - 1/exp(1)))
ans =
(6627126856707895/18014398509481984)^n
It's something close to 0.3679^n

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

카테고리

도움말 센터File Exchange에서 Vehicle Dynamics Blockset에 대해 자세히 알아보기

질문:

2011년 1월 25일

편집:

2023년 4월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by