sign
Perform signum function on array
Syntax
c = sign(a)
Description
c = sign(a)
returns an arrayc
the same size asa
, where each element ofc
is
1
if the corresponding element ofa
is greater than zero0
if the corresponding element ofa
is zero-1
if the corresponding element ofa
is less than zero
The elements ofc
are of data typeint8
.
sign
does not support complexfi
inputs.
Extended Capabilities
Introduced before R2006a
Was this topic helpful?