diracz

diracz, function

def pure diracz(n: number): zedfunc

Returns a zedfunc with value 1 at n and 0 everywhere else.

Examples

table T = with
  [| as N |]
  [| 0 |]
  [| 1 |]
  [| 2 |]

T.Value = valueAt(diracz(2), T.N)

show table "Dirac zedfunc" with
  T.N
  T.Value

This produces the following table:

N Value
0 0
1 0
2 1

Errors

n cannot be fractional.

User Contributed Notes
0 notes + add a note