This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Add-ons & Links / Standard Packages / DiscreteMath /


In signal processing applications, among others, it is often useful to represent a train of uniform impulses starting at the origin by a single function. Mathematica contains a function for a single impulse at the origin called DiscreteDelta, which could be used in an infinite sum to represent an impluse train, but this is awkward. Instead, we introduce the DiscreteStep function.

DiscreteStep functionality.

DiscreteStep[n] returns for nonnegative integer , and otherwise. DiscreteStep[, , ... ] returns if all the are nonnegative integers, and otherwise. DiscreteStep automatically maps itself across list elements. The function will remain unevaluated for symbolic input.

This loads the package.

In[1]:= <<DiscreteMath`DiscreteStep`

Here is the discrete step for various input values.

In[2]:= DiscreteStep[{1, 0, -1, 0.5, -0.5}]


The input can be multidimensional.

In[3]:= DiscreteStep[1, 2, 1, 0]


Symbolic expressions involving DiscreteStep can be simplified.

In[4]:= SimplifyDiscreteStep[
b DiscreteStep[n] + a DiscreteStep[n]


Summation rules for DiscreteStep are also available.

In[5]:= Sum[-DiscreteStep[-2 + x] + DiscreteStep[x],
{x, -Infinity, Infinity}]