sign

From STX Wiki
< Programmer Guide‎ | Command Reference‎ | EVAL
Revision as of 11:50, 21 April 2011 by 193.171.195.48 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Compute the sign of the argument.

Usage
sign(x)
x
a scalar, vector or matrix
Result
The result r has the same type as the argument x.
r[i,j] is set to 1 if x[i,j]≥0 and to -1 if x[i,j]<0
See also
int, round, floor

<function list>

Navigation menu

Personal tools