| Simulink Reference | ![]() |
Library
Description
The Unary Minus block negates the input. The block accepts only signed data types.
For signed data types, you cannot accurately negate the most negative value since the result is not representable by the data type. In this case, the behavior of the block is controlled by the Saturate to max or min when overflows occur check box. If selected, the most negative value of the data type wraps to the most positive value. If not selected, the operation has no effect. If an overflow occurs, then a warning is returned to the MATLAB command line.
For example, suppose the block input is an 8-bit signed integer. The range of this data type is from -128 to 127, and the negation of -128 is not representable. If you select the Saturate to max or min when overflows occur check box, then the negation of -128 is 127. If it is not selected, then the negation of -128 remains at -128.
Data Type Support
The Unary Minus block accepts signals of any data type supported by Simulink except unsigned integers, including fixed-point data types.
Parameters and Dialog Box
Characteristics
| Direct Feedthrough |
No |
| Scalar Expansion |
Yes, of input or initial conditions |
| Trigonometric Function | Uniform Random Number | ![]() |
© 1994-2005 The MathWorks, Inc.