| Contents | Index |
Math Operations
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:
Floating point
Signed integer
Fixed point
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 How to Specify the 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.
Direct Feedthrough | No |
Sample Time | Specified in the Sample time parameter |
Scalar Expansion | Yes, of input or initial conditions |
Dimensionalized | Yes |
Multidimensionalized | Yes |
Zero-Crossing Detection | No |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |