code of z transform for kroneckerDelta

I want to find z transfrom for kroneckerDelta using the follwoing code , I'm using MATLAB R2013a
syms n
x(n)=kroneckerDelta(n-1,0)
d=ztrans(x(n))
but this message appear
Error using sym/subsindex (line 1558)
Indexing input must be numeric, logical or ':'.
Error in sym>privformat (line 2357)
x = subsindex(x)+1;
Error in sym/subsref (line 1578)
[inds{k},refs{k}] = privformat(inds{k});
Error in Untitled3 (line 2)
x(n)=kroneckerDelta(n-1,0)

Respuestas (2)

It works correctly in R2021b
syms n
x(n)=kroneckerDelta(n-1,0)
x(n) = 
d=ztrans(x(n))
d = 
Perhaps an upgrade is in order?
.

2 comentarios

ali s
ali s el 20 de Nov. de 2021
I'm using matlab R2013a
Star Strider
Star Strider el 20 de Nov. de 2021
I did not know that.

Iniciar sesión para comentar.

Walter Roberson
Walter Roberson el 20 de Nov. de 2021

0 votos

kroneckerDelta() was added in R2014b. You will need to do one of the following:
  • write your own version of kroneckerDelta
  • write the code using different functions
  • see if you can find an equivalent function inside the symbolic engine and access it using evalin()

Categorías

Más información sobre Get Started with MATLAB en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 19 de Nov. de 2021

Comentada:

el 20 de Nov. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by