DiscreteIndicator[x,x1,{u1,u2,…}]
x=x1のときは1に等しく,その他の場合,何らかの i について x=uiのときは0に等しい離散指数関数を与える.
DiscreteIndicator
DiscreteIndicator[x,x1,{u1,u2,…}]
x=x1のときは1に等しく,その他の場合,何らかの i について x=uiのときは0に等しい離散指数関数を与える.
詳細
- DiscreteIndicator[x,x1,{u1,u2,…}]は,x あるいは x1がいずれの uiでもない場合は評価されない. »
例題
すべて開く すべて閉じる例 (1)
アプリケーション (1)
lm = LinearModelFit[{{a, 1.5}, {b, 2.3}, {b, 1.8}, {a, 2.5}}, x, x, NominalVariables -> x]Normal[lm]FittedModelを点 a と点 b で評価する:
{lm[a], lm[b]}特性と関係 (2)
両方の値が集合中にある場合,DiscreteIndicatorはBooleに等しい:
Table[{DiscreteIndicator[x, a, {a, b, c}], Boole[x === a]}, {x, {a, b, c}}]{DiscreteIndicator[x, a, {a, b, c}], Boole[x === a]}Flatten[Table[{{x, y},
DiscreteIndicator[x, a, {a, b}]DiscreteIndicator[y, b, {a, b}], DiscreteIndicator[{x, y}, {a, b}, {{a, a}, {a, b}, {b, a}, {b, b}}]}, {x, {a, b}}, {y, {a, b}}], 1] //Grid関連項目
テキスト
Wolfram Research (2008), DiscreteIndicator, Wolfram言語関数, 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_2026_discreteindicator, author="Wolfram Research", title="{DiscreteIndicator}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/DiscreteIndicator.html}", note=[Accessed: 09-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_discreteindicator, organization={Wolfram Research}, title={DiscreteIndicator}, year={2008}, url={https://reference.wolfram.com/language/ref/DiscreteIndicator.html}, note=[Accessed: 09-September-2026]}