Sign
Indicate sign of input
 Library:
Simulink / Math Operations
HDL Coder / HDL Floating Point Operations
HDL Coder / Math Operations
Description
Block Behavior for Real Inputs
For real inputs, the Sign block outputs the sign of the input:
Input  Output 

Greater than zero  1 
Equal to zero  0 
Less than zero  –1 
For vector and matrix inputs, the block outputs a vector or matrix where each element is the sign of the corresponding input element, as shown in this example:
Block Behavior for Complex Inputs
When the input u
is a complex scalar, the block output matches
the MATLAB^{®} result for:
sign(u) = u./ abs(u)
When an element of a vector or matrix input is complex, the block uses the same formula that applies to scalar input, as shown in this example:
Ports
Input
Output
Parameters
Block Characteristics
Data Types 

Direct Feedthrough 

Multidimensional Signals 

VariableSize Signals 

ZeroCrossing Detection 

Extended Capabilities
Version History
Introduced before R2006a