dirac

Dirac delta function and its derivatives.

Category: Mathematics > Mathematical Functions

Syntax

Y = dirac(X)

Evaluates the delta function delta(x).

Y = dirac(n, X)

Evaluates the n-th derivative of the delta.

Description

The delta function is zero everywhere but the origin, where it is infinite, and it integrates to 1. Numerically only these two values can be shown, so it is mostly a symbolic tool: it appears in laplace, fourier and ztrans of impulses, and it is the derivative of heaviside. The sifting property int(f*dirac(x-a)) = f(a) is what gives it meaning.

Input arguments

n
Non-negative integer order of the derivative.
X
Numeric or symbolic array.

Output arguments

Y
For numeric X: Inf where X is 0 and 0 elsewhere. For symbolic X: an unevaluated call such as dirac(x - 2).

Example

Numeric and symbolic delta

dirac([-1 0 1])
syms x
dirac(x - 2)
Output
ans = 1×3

     0   Inf     0
ans = dirac(x - 2)

Notes

Definite integrals of dirac are left unevaluated in MatLivre.

See also

heaviside laplace fourier kroneckerDelta int