yields the discrete indicator function, equal to 1 if x=x1 and, otherwise, to 0 if x=ui for some i.



open allclose all

Basic Examples  (1)

Give 1 if the first arguments are equal:

Give 0 if they are not equal:

If the first argument does not appear in the third argument, return unevaluated:

Applications  (1)

Represent nominal terms in fitting results:

See the functional form:

Evaluate the FittedModel at points a and b:

Properties & Relations  (2)

DiscreteIndicator is equivalent to Boole when both values are in the set:

They differ if either of the first two values is not in the set:

Products of indicator functions effectively correspond to an outer product:

Introduced in 2008