DiscreteIndicator[x,x1,{u1,u2,…}]
yields the discrete indicator function, equal to 1 if x=x1 and, otherwise, to 0 if x=ui for some i.


DiscreteIndicator
DiscreteIndicator[x,x1,{u1,u2,…}]
yields the discrete indicator function, equal to 1 if x=x1 and, otherwise, to 0 if x=ui for some i.
Examples
open all close allBasic Examples (1)
Applications (1)
Represent nominal terms in fitting results:
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:
See Also
Related Guides
History
Text
Wolfram Research (2008), DiscreteIndicator, Wolfram Language function, https://reference.wolfram.com/language/ref/DiscreteIndicator.html.
CMS
Wolfram Language. 2008. "DiscreteIndicator." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DiscreteIndicator.html.
APA
Wolfram Language. (2008). DiscreteIndicator. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DiscreteIndicator.html
BibTeX
@misc{reference.wolfram_2025_discreteindicator, author="Wolfram Research", title="{DiscreteIndicator}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/DiscreteIndicator.html}", note=[Accessed: 16-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_discreteindicator, organization={Wolfram Research}, title={DiscreteIndicator}, year={2008}, url={https://reference.wolfram.com/language/ref/DiscreteIndicator.html}, note=[Accessed: 16-August-2025]}