Unitize
Unitize[x]
gives 0 when x is zero, and 1 when x has any other numerical value.
Details
- Unitize[x,dx] gives 0 for any x with magnitude less than dx.
- Unitize[x] gives 0 whenever x==0 yields True.
- Unitize[x] in general works using PossibleZeroQ, and can handle numbers represented in symbolic form.
- Unitize has attribute Listable.
Examples
open allclose all
Wolfram Research (2007), Unitize, Wolfram Language function, https://reference.wolfram.com/language/ref/Unitize.html.
Text
Wolfram Research (2007), Unitize, Wolfram Language function, https://reference.wolfram.com/language/ref/Unitize.html.
CMS
Wolfram Language. 2007. "Unitize." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Unitize.html.
APA
Wolfram Language. (2007). Unitize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Unitize.html