Mathematica 9 is now available
 Documentation / Mathematica / Add-ons / Standard Packages / DiscreteMath  /

DiscreteMath`KroneckerDelta`

This package introduces two functions defined on the integers, It is automatically loaded by the ZTransform package in the DiscreteMath subdirectory. KroneckerDelta and DiscreteStep.


DiscreteStep and KroneckerDelta.

  • This loads the package.
  • In[1]:= <<DiscreteMath`KroneckerDelta`

  • DiscreteStep[n] has a step of size unity at

    . The discrete step is zero for nonintegral arguments.
  • In[2]:= Table[DiscreteStep[n], {n, -2, 2, 1/2}]

    Out[2]=

  • KroneckerDelta[n] is zero for all nonzero . The value of KroneckerDelta[

    n] at

    is unity.
  • In[3]:= Table[KroneckerDelta[n], {n, -2, 2, 1/2}]

    Out[3]=

  • This demonstrates the sampling property of the Kronecker delta. It is assumed that f[n] is defined on the integers and

    is integer-valued.
  • In[4]:= Sum[KroneckerDelta[n - a] f[n],
    {n, -Infinity, Infinity}]

    Out[4]=

  • This demonstrates the sampling property of differences of the Kronecker delta.
  • In[5]:= Sum[( (KroneckerDelta[n] - KroneckerDelta[n-1]) -
    (KroneckerDelta[n-1] - KroneckerDelta[n-2]) ) f[n],
    {n, -Infinity, Infinity}]

    Out[5]=


    Multidimensional DiscreteStep and KroneckerDelta.

  • A multidimensional discrete unit step may be expressed as DiscreteStep[n,m] or as the product DiscreteStep[n]DiscreteStep[m].
  • In[6]:= Sum[f[n m] DiscreteStep[n, m],
    {n, -Infinity, n1}, {m, -Infinity, m1}]

    Out[6]=

  • Since the discrete unit step is separable, the value of DiscreteStep[n,m] at is DiscreteStep[

    m].
  • In[7]:= DiscreteStep[0, m]

    Out[7]=

  • This is a plot of the characteristic or indicator function for the set of integers



    n,m

    :n^2+m^2<=100,n+m>=10

    .
  • In[8]:= (r = Range[0, 10]; t = Transpose[{r + .5, r}];
    ListDensityPlot[
    Table[DiscreteStep[100 - n^2 - m^2, n + m - 10],
    {n, 0, 10}, {m, 0, 10}], FrameTicks -> {t, t}])



    Simplifying expressions involving DiscreteStep.

  • Complicated expressions involving DiscreteStep can sometimes be simplified using SimplifyDiscreteStep.
  • In[9]:= DiscreteStep[n - 2] (KroneckerDelta[n - 3] +
    DiscreteStep[n, m] DiscreteStep[m - 1]) //
    SimplifyDiscreteStep

    Out[9]=


    Simplifying expressions involving KroneckerDelta.

  • Expressions containing terms equivalent to zero can sometimes be simplified using SimplifyKroneckerDelta.
  • In[10]:= (f[n] + KroneckerDelta[n]) DiscreteStep[n-3] //
    SimplifyKroneckerDelta

    Out[10]=



    Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
    THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
    SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.