The Unary Minus block negates the input.
For signed-integer data types, the unary minus of the most negative value is not representable by the data type. In this case, the Saturate on integer overflow check box controls the behavior of the block:
|If you...||The block...||And...|
|Select this check box||Saturates to the most positive value of the integer data type|
|Do not select this check box||Wraps to the most negative value of the integer data type|
The Unary Minus block accepts and outputs signals of the following data types:
For more information, see Data Types Supported by Simulink in the Simulink® documentation.
This parameter is not visible in the block dialog box unless
it is explicitly set to a value other than
Select to have integer overflows saturate. Otherwise, overflows wrap.
When you select this check box, saturation applies to every internal operation on the block, not just the output or result. In general, the code generation process can detect when overflow is not possible. In this case, the code generator does not produce saturation code.
Double | Single | Base Integer | Fixed-Point
Inherited from driving block