Sign
Indicate sign of input
Libraries:
Simulink /
Math Operations
HDL Coder /
HDL Floating Point Operations
HDL Coder /
Math Operations
Description
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 |
When the input u
is a complex scalar, the block output matches the
MATLAB® result for:
sign(u) = u./ abs(u)
| (1) |
Examples
Extended Examples
Ports
Input
Output
Parameters
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Extended Capabilities
Version History
Introduced before R2006a