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.

Details

Examples

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:

Wolfram Research (2008), DiscreteIndicator, Wolfram Language function, https://reference.wolfram.com/language/ref/DiscreteIndicator.html.

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_2024_discreteindicator, author="Wolfram Research", title="{DiscreteIndicator}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/DiscreteIndicator.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_discreteindicator, organization={Wolfram Research}, title={DiscreteIndicator}, year={2008}, url={https://reference.wolfram.com/language/ref/DiscreteIndicator.html}, note=[Accessed: 22-December-2024 ]}