Description Usage Arguments Value See Also Examples
Get binary sign of a variable, or array
1 | sign_no_zero(x)
|
x |
a vector or array |
a vector or array telling if each element of x is
greater than or equal to zero. This array will be of the same
dimension as x
, but with elements -1 for negative values of
x
, and elements +1 for positive values of x
1 | sign_no_zero(-2:2) #returns -1 -1 1 1 1
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.