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.
Specify the time interval between samples. To inherit the sample time, set this parameter to -1. For more information, see Specify Sample Time in the Simulink documentation.
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.