|
Contents | Previous | Next | Subchapters |
| Syntax |
sign(x) |
| See Also | ordered comparisons |
sign([-3, 4, 0])
returns
[ -1 , 1 , 1 ]
sign function
accepts complex arguments and returns x ./ abs(x) in this case.
In addition, it
returns zero if the argument if the argument is equal to zero.
If in Mlmode you enter
sign( [ 0*i , 1*i , 2*i ] )
O-Matrix will respond
[ (0,0) , (0,1) , (0,1) ]